home *** CD-ROM | disk | FTP | other *** search
/ IBM OEM Software Product … CD For PC Manufacturers / IBM OEM Software - Product Sampler CD for PC Manufacturers.iso / InternetIntranets / Notes / LOTUS027.DSK / DOCLIB4.NTF (.txt) < prev    next >
Lotus Notes Database  |  1997-08-08  |  406KB  |  3,418 lines

  1. Document Library (R4)
  2. #1StdR4DocLib
  3. Document Library (R4
  4. CN=Lotus Notes Template Development/O=Lotus Notes
  5. FOLDER_DIRECTORY_OBJECT
  6. My Favorite Documents
  7. *Nb:O
  8. K!Dp    }
  9. i*`Lg
  10. i*`Lg
  11. $Modified
  12.     1S2S3S
  13. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$UpdatedBy$$FormScript_O
  14.     0SL1S3724
  15. $TITLE
  16. CN=Catherine Duffy/O=Iris##########################################################
  17. Process Late Reviews
  18. Selects those documents which are in review and have due dates which have passed.  Based upon the review style of the document, it then either moves it along to the next reviewer, marks it as complete, or simply notifies the current reviewer(s) that their review is overdue.1SfL3
  19. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  20. #########################
  21. CN=Catherine Duffy/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###############
  22. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  23. ##########################################################
  24. CN=Catherine Duffy/OU=NAHQ/O=LotusCN=Catherine Duffy/O=IrisLotus NotesCN=Catherine Duffy/O=IrisLotus NotesCN=Catherine Duffy/O=IrisLotus NotesCN=Lotus Notes Template Development/O=Lotus Notes5
  25. ##########################################################
  26. CN=Ryan Jansen/O=Iris
  27. ##########################################################
  28. Review Status|Review Status
  29. Scope
  30. Private
  31. ExpireDate
  32. _ViewIcon
  33.     2S3S4S6S8S9S12S14S
  34. DocumentG
  35. $VersionOpt
  36. Original by 
  37. ReviewStyle
  38. Review by 
  39. LastEditor
  40. Subject
  41. Subject
  42.     6S9RS4E16RS9E22S25RS4E31RS9E32S33S2E37S40RS4E44R47S48S50RS5E52R53S54S56S57S58S59S63S65S66S
  43. CurrentReviewers
  44. FutureReviewers
  45.     5S6S8S10S
  46. Status$40$41SubjectFrom$26DueDateTime$Conflict$REF
  47. Statush
  48. Status
  49.     L1S5S6S7S8S1%
  50. StatusDueDateTime
  51. Subject$26
  52. DueDateTime$26Y
  53. CN=Catherine Duffy/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#############
  54. ##########################################################
  55. '++LotusScript Development Environment:2:5:(Options):0:66
  56. Option Public
  57. '++LotusScript Development Environment:2:5:(Forward):0:1
  58. Declare Sub Initialize
  59. Declare Sub SendReminder(EmailType)
  60. Declare Sub MoveToNextReviewer
  61. '++LotusScript Development Environment:2:5:(Declarations):0:10
  62. Dim s As NotesSession
  63. Dim db As NotesDatabase
  64. Dim view As NotesView
  65. Dim documents As NotesDocumentCollection
  66. Dim note As NotesDocument
  67. Dim parent As NotesDocument
  68. Dim emaildoc As NotesDocument
  69. Dim dt As NotesDateTime
  70. Dim item As NotesItem
  71. Dim rtitem As NotesRichTextItem
  72. Dim CurrentReviewers As Variant
  73. Dim FutureReviewers As Variant
  74. Dim ReviewSeq As Variant
  75. Dim ReviewWindow As Variant
  76. Dim NewList() As Variant
  77. Dim ListMax As Integer
  78. Dim NextReviewer As Variant
  79. Dim OldDueDate As Variant
  80. '++LotusScript Development Environment:2:2:Initialize:1:10
  81. Sub Initialize
  82.      
  83.      Set s = New NotesSession    
  84.      Set db = s.CurrentDatabase
  85.      Set dt = New NotesDateTime("")
  86.      dt.SetNow
  87.      Set documents = db.Search("@Today => @Date(DueDateTime) & Status = ""In Review""", Nothing, 0)
  88.      If documents.Count = 0 Then Exit Sub
  89.      
  90.      For d = 1 To documents.Count
  91.           Set note = documents.GetNthDocument(d)
  92.           ReviewWindow = note.ReviewWindow      
  93.           Select Case ReviewWindow(0)
  94.           Case "MoveOn"
  95.                MoveToNextReviewer
  96.                SendReminder("WindowExpired")
  97.                If ReviewSeq = "Serial" Then
  98.                     If FutureReviewers(0) <> "None" Then SendReminder("NotifyNextReviewer")
  99.                End If
  100.           Case "Reminder"
  101.                CurrentReviewers = note.CurrentReviewers
  102.                SendReminder("Reminder")
  103.           End Select
  104.           If note.IsResponse Then
  105.                note.RemoveItem("DueDateTime")
  106.                note.Save True, True
  107.           End If
  108.      Next
  109.      
  110. End Sub
  111. '++LotusScript Development Environment:2:2:SendReminder:1:8
  112. Sub SendReminder(EmailType)
  113.      
  114.      If note.IsResponse Then Exit Sub
  115.      
  116.      Set maildoc = New NotesDocument(db)
  117.      Set rtitem = New NotesRichTextItem(maildoc, "Body")
  118.      maildoc.InheritedSubject = note.Subject
  119.      maildoc.InheritedDbTitle = db.Title
  120.      
  121.      Select Case EmailType
  122.      Case "Reminder"
  123.           maildoc.SendTo = CurrentReviewers
  124.           maildoc.Subject = "Overdue Document Review"
  125.           maildoc.FlowStatus = "Please complete your review of this document.  You will continue to receive these notifications until it is complete."
  126.           Call rtitem.AppendDocLink(note, "DocLink to Overdue Document")
  127.           maildoc.DueDateTime = OldDueDate
  128.      Case "WindowExpired"
  129.           maildoc.SendTo = CurrentReviewers
  130.           maildoc.Subject = "Document Review Period has Expired"
  131.           maildoc.FlowStatus = "The time limit for your review of this document has expired."
  132.           Call rtitem.AppendDocLink(note, "DocLink to Overdue Document")
  133.           maildoc.DueDateTime = OldDueDate
  134.      Case "NotifyNextReviewer"
  135.           maildoc.SendTo = note.CurrentReviewers
  136.           maildoc.Subject = "Document Requires Review"
  137.           maildoc.FlowStatus = "Please take the time to review this document before the date shown below."
  138.           Call rtitem.AppendDocLink(note, "DocLink to Document requiring review")
  139.           maildoc.DueDateTime = note.DueDateTime
  140.      End Select
  141.      
  142.      maildoc.Form = "Bookmark"
  143.      On Error Resume Next
  144.      Call maildoc.Send (False)
  145.      
  146. End Sub
  147. '++LotusScript Development Environment:2:2:MoveToNextReviewer:1:8
  148. Sub MoveToNextReviewer
  149.      
  150.      ListMax = 0
  151.      Set dt = New NotesDateTime("")
  152.      dt.SetNow
  153.      ReviewStyle = note.ReviewStyle
  154.      position = Instr(ReviewStyle(0), ".")
  155.      ReviewSeq = Left(ReviewStyle(0), position - 1)
  156.      Versioning = Mid(ReviewStyle(0), position + 1)
  157.      OldDueDate = Datevalue(note.DueDateTime(0))
  158.      dt.LSLocalTime = OldDueDate
  159.      ReviewerLogEntry = "Review period ended on " & Format(dt.LSLocalTime, "Short Date") & " without a completed review by "
  160.      dt.SetNow
  161.      
  162.      Select Case ReviewSeq
  163.      Case "Parallel"
  164. 'For Response Reviews, we maintain the status in the parent so remove these
  165.           If note.IsResponse Then 
  166.                note.RemoveItem("PreviousReviewers")
  167.                note.RemoveItem("CurrentReviewers")
  168.                note.RemoveItem("FutureReviewers")
  169.           Else
  170. 'If it is a parent, move CurrentReviewers to PreviousReviewers and set CurrentReviewers to "None"               
  171.                CurrentReviewers = note.CurrentReviewers
  172.                LateReviewers = Evaluate("@Implode(CurrentReviewers; "", "")", note)
  173.                Set item = note.GetFirstItem("ReviewerLog")
  174.                item.AppendToTextList(ReviewerLogEntry & LateReviewers(0))
  175.                PreviousReviewers = note.PreviousReviewers
  176.                If PreviousReviewers(0) = "None" Then
  177.                     note.PreviousReviewers = CurrentReviewers
  178.                Else
  179.                     Set item = note.GetFirstItem("PreviousReviewers")
  180.                     item.AppendToTextList(CurrentReviewers)
  181.                End If
  182.                note.CurrentReviewers = "None"    
  183.           End If
  184.           note.InProcess = "None"
  185.           note.Status = "Review Complete"
  186.           note.RemoveItem("DueDateTime")
  187.           note.DocumentAuthors = note.From
  188.      Case "Serial"
  189.           CurrentReviewers = note.CurrentReviewers         
  190.           Set item = note.GetFirstItem("ReviewerLog")
  191.           item.AppendToTextList(ReviewerLogEntry & CurrentReviewers(0))
  192.           PreviousReviewers = note.PreviousReviewers
  193.           If PreviousReviewers(0) = "None" Then
  194.                note.PreviousReviewers = CurrentReviewers(0)
  195.           Else              
  196.                Set item = note.GetFirstItem("PreviousReviewers")
  197.                item.AppendToTextList(CurrentReviewers(0))
  198.           End If
  199.           FutureReviewers = note.FutureReviewers
  200. 'Put the first person in the future reviewers list in current reviewer and remove that person from future reviewers list
  201.           note.CurrentReviewers = FutureReviewers(0)
  202.           If Ubound(FutureReviewers) = 0 Then
  203.                note.FutureReviewers = "None"
  204.           Else
  205.                ListMax = Ubound(FutureReviewers) - 1
  206.                Redim NewList (ListMax)
  207.                x = 0 
  208.                For y = 1 To ListMax
  209.                     NewList(x) = FutureReviewers(y)
  210.                     x = x + 1
  211.                Next
  212.                note.FutureReviewers = NewList
  213.           End If
  214. 'Calculate when the review is due, based upon ReviewTime     
  215.           If FutureReviewers(0) = "None" Then
  216.                note.RemoveItem("DueDateTime")
  217.                note.Status = "Review Complete"
  218.                note.DocumentAuthors = note.From
  219.           Else
  220.                ReviewTime = note.ReviewTime
  221.                dt.SetNow
  222.                If Isnumeric(ReviewTime(0)) Then
  223.                     dt.AdjustDay(ReviewTime(0))
  224.                     note.DueDateTime = dt.LSLocalTime
  225.                Else
  226.                     note.RemoveItem("DueDateTime")
  227.                End If
  228.                Redim NewList(1)
  229.                Originator = note.From
  230.                NextReviewer = note.CurrentReviewers
  231.                NewList(0) = Originator(0)
  232.                NewList(1) = NextReviewer(0)
  233.                note.DocumentAuthors = NewList
  234.           End If
  235.      End Select
  236.      
  237.      note.Save True, True
  238.      
  239. End Sub
  240. CurrentReviewers
  241. O=Lotus Notes
  242. O=Lotus Notes
  243. PURSAFO
  244. |.:#U
  245. O=Lotus Notes
  246. CN=Lotus Notes Template Development/O=Lotus Notes
  247. PURSAFO
  248. Fde!f^^
  249. }/JB8!Ef
  250. $TITLE
  251. $AssistType
  252. $AssistLastRun
  253. $AssistDocCount
  254. $Comment
  255. $AssistFlags
  256. $AssistTrigger
  257. $AssistInfo
  258. $AssistQuery
  259. $AssistAction
  260. $AssistAction_Ex
  261. $Flags
  262. O=Lotus Notes
  263. O=Lotus Notes
  264. PURSAFO
  265. |.:#U
  266. O=Lotus Notes
  267. CN=Lotus Notes Template Development/O=Lotus Notes
  268. PURSAFO
  269. Fde!f^^
  270. sZ%!ZM}
  271. $Flags
  272. Times New Roman
  273. bullet
  274. Using Document Library
  275.  @  @@ @` @
  276. @@ @@@@@`@@
  277. `@ `@@`@``@
  278.     This database allows you to capture and track information about documents.
  279. Functions of the Database:
  280.     To add a document to this database
  281.     Select Create, Document.
  282.     You can enter document information in several ways: by typing it using the Notes editor, by scanning in hard copy, or by importing or attaching an electronic file. 
  283.     To respond to a document
  284.     Highlight that document in a view, then select Create, Response.
  285.     To respond to a response
  286.     Highlight the response you wish to respond to, then select Create, Response to Response.
  287.     To flag a document as Private:
  288.     You can use the "Mark Private" and
  289.     "Mark Public" actions in the template to control whether anyone other than yourself can read a specific document.  For example, if you have not completed the writing of a particular document, you can click the "Mark Private" action and others will not be able to see the document.  When you complete the document, you can click the
  290.     "Mark Public"
  291.     action to make it available for others to read.  If a document is marked private after it has been submitted for review, the document author and the reviewers will be able to read the document.
  292. ACL Settings
  293.     This application was designed with the intention that all users except the manager should have Author access.  If they have editor access, the review cycle may not function correctly.
  294. Features
  295.     Document Review Cycle:
  296.     The author of a document has the option of setting up a document review cycle for that document. To do so simply click on the Setup Review Cycle action button and fill in the necessary information.  
  297.     Note:  
  298.     Do not use 
  299.     @Domain
  300.      when entering approver names.  Any domain added will be stripped off and may cause complications when attempting to route a request.  Also, only enter Person-names as approvers.  Group names are not supported.
  301.     Clearing a Review Cycle:
  302.     Document Library, SmartSuite 96 Library, and MS Office Library provides an action button to "Clear Review Cycle".  This is accessible only by the document's originator.  You can either use the action prior to submitting a document for review, or after submittal.  Below are the guidelines:
  303.     o    Clearing a review cycle prior to submitting for review:  
  304.     Select this if you, as originator, wish to change the review cycle settings before your reviewers receive notification.
  305.     o    Clearing a review cycle after submittal:  
  306.     If reviewers have already begun or completed their document review, their work will be preserved.  If reviewers were notified to review a document and they have not yet begun the review, they will receive a courtesy notice that they are no longer required to conduct a review.
  307.     Document Library Review Styles:
  308.     Serial Review:
  309.       Documents are routed for review one at a time, in sequence to the reviewers chosen by the author.
  310.     o    All edits are made within the same document
  311.     , but an unedited copy of the original document is also saved.
  312.     Serial Review (keep all revisions):
  313.       Documents are routed for review one at a time, in sequence to the reviewers chosen by the author.
  314.     o    Edits are made within a copy of the original, 
  315.     which also includes all comments from previous reviewers
  316.     o    All old versions become response documents (as well as a copy of the original)
  317.     Document Reservations:
  318.       Requests for document review are routed in parallel (that is, all at the same time).  When one reviewer opens the document, a "file locking" occurs at the server which warns any other user who happens to edit the document that a review is in progress.  
  319.     o    Review comments or edits are made into 
  320.     a copy of 
  321.     the original document
  322.     o    As with the others, a clean copy of the original is always kept
  323.     Response Review:
  324.       Same as Document Reservations (but with no file locking).
  325.     o    Review comments or edits are saved as response documents to the original document.  
  326.     o    As with the others, a clean copy of the original is always kept
  327.     Processing Late Reviews:
  328.     If the Process Late Reviews agent is enabled, it selects those documents which are in review and have due dates which have passed.  Based upon the review style of the document, it then either moves it along to the next reviewer, marks it as complete, or simply notifies the current reviewer(s) that their review is overdue.
  329.     Unlock Document:
  330.     Occasionally a document is accidentally left in a locked state.  The Unlock Document action can be accessed by designers and managers from the Review Status view's Action menu to unlock the document.
  331.     Document Archiving:
  332.     This is a process by which certain documents are removed from the current database and stored in a different database.  This keeps the document library up-to-date with only the latest topics.  Most of the Archiving activities take place from the "Archiving" view.  You must switch to this view in order to initiate archiving on a document library database.
  333.     To set up archiving on any 
  334.     document library 
  335.     database, switch to the Archiving view and click the action called "Setup Archive".  The Archive Profile appears.  This document contains criteria that the user specifies for archiving topics in a 
  336.     document library 
  337.     (e.g., inactive after 'x' days, or expired after 'x' days).  The archive database is automatically created when the Profile is saved.  The archival database filename is also specified in the Archive Profile; the title of the archive will be the title of the Document Library database followed by "(Archived)".  After the archive criteria have been specified in the Archive Profile, other agents run on the database to move the document(s).  
  338.     Mark/Unmark Document as Expired:
  339.       Marks a topic as "expired".  If the Archive Profile specifies that 
  340.     expired 
  341.     topics should be archived, the document(s) marked with this agent would fall into that criterion.  If a document is already marked as expired, this agent tells the user what the expire date was, and will ask if the user wants to un-expire it.
  342.     Periodic Archive:
  343.       Reviews the Archive Profile and moves documents which meet the archive criteria into the archive database.  This agent is run automatically on the server; the schedule is set by the database manager/designer.
  344. O=Lotus Notes
  345. O=Lotus Notes
  346. PURSAFO
  347. |.:#U
  348. O=Lotus Notes
  349. CN=Lotus Notes Template Development/O=Lotus Notes
  350. PURSAFO
  351. Fde!f^^
  352. 2>eX0
  353. $Info
  354. $Body
  355. O=Lotus Notes
  356. O=Lotus Notes
  357. PURSAFO
  358. |.:#U
  359. O=Lotus Notes
  360. CN=Lotus Notes Template Development/O=Lotus Notes
  361. PURSAFO
  362. Fde!f^^
  363. $ACLDigest
  364. $SUBVIEWBy _Author|By Author
  365. Scope
  366. Private
  367. ExpireDate
  368. _ViewIcon
  369.     2S3S4S6S8S9S12S14S
  370. DocumentG
  371. Status
  372. StatusY
  373. Subject
  374. $VersionOpt
  375. Subject
  376.   (Original document in review cycle)
  377. ReviewStyle
  378. ParallelG
  379. Subject
  380.   (Reviewed by 
  381. LastEditor"
  382. Subject
  383.   (Reviewed by 
  384. PreviousReviewers
  385. Archive
  386. Subject
  387. Subject
  388. (Response to 
  389. OriginalSubject
  390. Subject
  391.  (Response to "
  392. OriginalSubject
  393.     6S9RS4E12S13S14S15S20RS8E22RS4E27RS8E28S29S31RS4E35S38RS9E39S40S41S42S2E43S44S46RS4E47S48S49S50S56S57S60R64S67RS4E69R70S71S73RS5E74S75S76S79R80S81S82S83S84S85S
  394. $45$42$36$43$Conflict
  395.     L1S2E1
  396. $45$36
  397. $36$43
  398. CN=Catherine Duffy/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes##
  399. $SUBVIEW($All)|($All)
  400. Scope
  401. Private
  402. ExpireDate
  403. _ViewIcon
  404.     2S3S4S6S8S9S12S14S
  405. DocumentG
  406. $VersionOpt
  407. Original by 
  408. ReviewStyle
  409. Review by 
  410. LastEditor
  411. Subject
  412. Subject
  413.     6S9RS4E16RS9E17S18S22S25RS4E31RS9E32S33S2E37S40RS4E44R47S48S50RS5E52R53S54S56S57S58S59S63S65S66S
  414. Categories$51$54$52Subject$25$53$Conflict$REF
  415. Categories$54$25
  416. Subject
  417. $25$53
  418. $53$25TYd
  419. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes########################################
  420. My Favorite DocumentsMy Favorite Documents/L
  421. Scope
  422. Private
  423. ExpireDate
  424. _ViewIcon
  425.     2S3S4S6S8S9S12S14S
  426. DocumentG
  427. Status
  428. StatusY
  429. Subject
  430. $VersionOpt
  431. Subject
  432.   (Original document in review cycle)
  433. ReviewStyle
  434. ParallelG
  435. Subject
  436.   (Reviewed by 
  437. LastEditor"
  438. Subject
  439.   (Reviewed by 
  440. PreviousReviewers
  441. Archive
  442. Subject
  443. Subject
  444. (Response to 
  445. OriginalSubject
  446. Subject
  447.  (Response to "
  448. OriginalSubject
  449.     6S9RS4E12S13S14S15S20RS8E22RS4E27RS8E28S29S31RS4E35S38RS9E39S40S41S42S2E43S44S46RS4E47S48S49S50S56S57S60R64S67RS4E69R70S71S73RS5E74S75S76S79R80S81S82S83S84S85S
  450. $29$30$27From$Conflict
  451. From$27FYpd
  452. Debbie BrancoCN=Lotus Notes Template Development/O=Lotus Notes
  453. ##########################
  454. ##########################################################
  455. ##########################################################
  456. ##########################################################
  457.  $45,
  458. Scope
  459. Private
  460. ExpireDate
  461. _ViewIcon
  462.     2S3S4S6S8S9S12S14S
  463. $36Modified
  464. $43Title
  465. DocumentG
  466. Status
  467. StatusY
  468. Subject
  469. $VersionOpt
  470. Subject
  471.   (Original document in review cycle)
  472. ReviewStyle
  473. ParallelG
  474. Subject
  475.   (Reviewed by 
  476. LastEditor"
  477. Subject
  478.   (Reviewed by 
  479. PreviousReviewers
  480. Archive
  481. Subject
  482. Subject
  483. (Response to 
  484. OriginalSubject
  485. Subject
  486.  (Response to "
  487. OriginalSubject
  488.     6S9RS4E12S13S14S15S20RS8E22RS4E27RS8E28S29S31RS4E35S38RS9E39S40S41S42S2E43S44S46RS4E47S48S49S50S56S57S60R64S67RS4E69R70S71S73RS5E74S75S76S79R80S81S82S83S84S85S&
  489. Categori_ze
  490. _Edit Document
  491. Send Docu_ment
  492. _Forward
  493. Navigator H
  494. EnvName
  495. NavigatorState"
  496.     1S2S
  497. EnvName
  498. EnvName
  499. Main Navigator
  500. EnvName
  501.     0R11RS8E13RS20E14S20RS20E30RS8E32RS20E33S39RS20E44RS9E
  502. New Document,
  503. Document
  504.     0S0E
  505. Response,
  506. Response
  507.     0S0E
  508. Response to Response8
  509. Response to Response
  510.     0S0E
  511. _Move to Folder...    
  512. _Remove from Folder...
  513. O=Lotus Notes
  514. O=Lotus Notes
  515. PURSAFO
  516. |.:#U
  517. O=Lotus Notes
  518. CN=Lotus Notes Template Development/O=Lotus Notes
  519. PURSAFO
  520. Fde!f^^
  521. 2_gj7.
  522. $TYPE
  523. $Index
  524. $Formula
  525. $FormulaClass
  526. $VIEWFORMAT
  527. $Comment
  528. $ACTIONS
  529.  Status  $40
  530. Scope
  531. Private
  532. ExpireDate
  533. _ViewIcon
  534.     2S3S4S6S8S9S12S14S
  535. DocumentG
  536. $VersionOpt
  537. Original by 
  538. ReviewStyle
  539. Review by 
  540. LastEditor
  541. Subject
  542. Subject
  543.     6S9RS4E16RS9E22S25RS4E31RS9E32S33S2E37S40RS4E44R47S48S50RS5E52R53S54S56S57S58S59S63S65S66S
  544. SubjectTitleFromCreated By$26ReviewersX
  545. CurrentReviewers
  546. FutureReviewers
  547.     5S6S8S10SDueDateTimeDue&
  548. Categori_ze
  549. _Edit Document
  550. Send Docu_ment
  551. _Forward
  552. Navigator H
  553. EnvName
  554. NavigatorState"
  555.     1S2S
  556. EnvName
  557. EnvName
  558. Main Navigator
  559. EnvName
  560.     0R11RS8E13RS20E14S20RS20E30RS8E32RS20E33S39RS20E44RS9E
  561. New Document,
  562. Document
  563.     0S0E
  564. Response,
  565. Response
  566.     0S0E
  567. Response to Response8
  568. Response to Response
  569.     0S0E
  570. _Move to Folder...    
  571. _Remove from Folder...
  572. Unlock Document
  573. (Unlock Document)
  574. Server
  575.     1S2S6S
  576.     0R1S2S6S
  577. Server
  578.     0R7S8S11S13S14S15S16S
  579. O=Lotus Notes
  580. O=Lotus Notes
  581. PURSAFO
  582. |.:#U
  583. O=Lotus Notes
  584. CN=Lotus Notes Template Development/O=Lotus Notes
  585. PURSAFO
  586. Fde!f^^
  587. $Index
  588. $Formula
  589. $FormulaClass
  590. $VIEWFORMAT
  591. $Comment
  592. $ACTIONS
  593.  Categories$51
  594. Scope
  595. Private
  596. ExpireDate
  597. _ViewIcon
  598.     2S3S4S6S8S9S12S14S
  599. DocumentG
  600. $VersionOpt
  601. Original by 
  602. ReviewStyle
  603. Review by 
  604. LastEditor
  605. Subject
  606. Subject
  607.     6S9RS4E16RS9E17S18S22S25RS4E31RS9E32S33S2E37S40RS4E44R47S48S50RS5E52R53S54S56S57S58S59S63S65S66S
  608. SubjectTitle$25Modified
  609. $53Author,
  610. Categori_zeo
  611. _Edit Document
  612. Send Docu_ment
  613. _Forward
  614. Navigator
  615. EnvName
  616. NavigatorState"
  617.     1S2S
  618. EnvName
  619. EnvName
  620. Main Navigator
  621. EnvName
  622.     0R11RS8E13RS20E14S20RS20E30RS8E32RS20E33S39RS20E44RS9E
  623. New Document,
  624. Document
  625.     0S0E
  626. Response,
  627. Response
  628.     0S0E
  629. Response to Response8
  630. Response to Response
  631.     0S0E
  632. _Move to Folder...    
  633. _Remove from Folder...
  634. O=Lotus Notes
  635. O=Lotus Notes
  636. PURSAFO
  637. |.:#U
  638. O=Lotus Notes
  639. CN=Lotus Notes Template Development/O=Lotus Notes
  640. PURSAFO
  641. Fde!f^^
  642. @GZ3b
  643. $TYPE
  644. $TITLE
  645. $Index
  646. $Formula
  647. $FormulaClass
  648. $VIEWFORMAT
  649. $Comment
  650. $ACTIONS
  651. My Favorite Documents
  652. Scope
  653. Private
  654. ExpireDate
  655. _ViewIcon
  656.     2S3S4S6S8S9S12S14S
  657. $30Title
  658. DocumentG
  659. Status
  660. StatusY
  661. Subject
  662. $VersionOpt
  663. Subject
  664.   (Original document in review cycle)
  665. ReviewStyle
  666. ParallelG
  667. Subject
  668.   (Reviewed by 
  669. LastEditor"
  670. Subject
  671.   (Reviewed by 
  672. PreviousReviewers
  673. Archive
  674. Subject
  675. Subject
  676. (Response to 
  677. OriginalSubject
  678. Subject
  679.  (Response to "
  680. OriginalSubject
  681.     6S9RS4E12S13S14S15S20RS8E22RS4E27RS8E28S29S31RS4E35S38RS9E39S40S41S42S2E43S44S46RS4E47S48S49S50S56S57S60R64S67RS4E69R70S71S73RS5E74S75S76S79R80S81S82S83S84S85S$27Date
  682. FromAuthor&
  683. Categori_ze
  684. _Edit Document
  685. Send Docu_ment
  686. _Forward
  687. Navigator
  688. EnvName
  689. NavigatorState"
  690.     1S2S
  691. EnvName
  692. EnvName
  693. Main Navigator
  694. EnvName
  695.     0R11RS8E13RS20E14S20RS20E30RS8E32RS20E33S39RS20E44RS9E
  696. New Document,
  697. Document
  698.     0S0E
  699. Response,
  700. Response
  701.     0S0E
  702. Response to Response8
  703. Response to Response
  704.     0S0E
  705. _Move to Folder...    
  706. _Remove from Folder...
  707. O=Lotus Notes
  708. O=Lotus Notes
  709. PURSAFO
  710. |.:#U
  711. O=Lotus Notes
  712. CN=Lotus Notes Template Development/O=Lotus Notes
  713. PURSAFO
  714. Fde!f^^
  715. $Name
  716. $Index
  717. $Formula
  718. $FormulaClass
  719. $VIEWFORMAT
  720. $Comment
  721. $ACTIONS
  722. Main NavigatorG3
  723. Debbie BrancoCN=Lotus Notes Template Development/O=Lotus Notes####################################################
  724. *Nb:O
  725. Response to ResponseResponse to Response
  726. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes############################################
  727. ReviewOptionsReviewOptionsCD
  728. CN=Catherine Duffy/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  729. ##########################################################
  730. DocumentWorkflowCUA3
  731. CN=Catherine Duffy/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes############################
  732. ResponseResponse
  733. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes############
  734. DocumentDocumentDocumentWorkflow
  735. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus NotesCN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes2280E14EA22FC3754865C81CA18819DC0C353B7A95045A67500F74639D1478D967843E4301C6054E658E2C2D65E5AC9DCN=Lotus Notes Template Development/O=Lotus Notes#
  736. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes
  737. ##########################################################
  738. (Unlock Document)Use if a doc is accidentally left in a locked state.  Can be accessed by designers and managers from the Review Status view.003
  739. Lotus NotesCN=Lotus Notes Template Development/O=Lotus Notes
  740. ##########################################################
  741. 255D2116B7BDFECF1769F57E5917AA29Lotus Notes
  742. (Archive Log)Archive LogArchiveLogCD
  743. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes###########
  744. Mark/Unmark Document As Expired
  745. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################
  746. ##########################################################
  747. ##########################################################
  748. ($All)
  749. TextBox1All Documents
  750. TextBox2By Author
  751. TextBox3My Favorite Documents
  752. TextBox4By Review Status
  753. TitleDocuments:
  754. AllDocs
  755. ($All)
  756. ByAuthor
  757. By Author
  758. ByStatus
  759. Review Status
  760. MyFavDocs
  761. My Favorite Documents
  762. O=Lotus Notes
  763. O=Lotus Notes
  764. PURSAFO
  765. |.:#U
  766. O=Lotus Notes
  767. CN=Lotus Notes Template Development/O=Lotus Notes
  768. PURSAFO
  769. Fde!f^^
  770. $ViewMapDataset
  771. $ViewMapLayout
  772. NewDocTitle
  773. New Response to "
  774. Subject
  775.     1S2S3S4S5S6S
  776. StandardTitle
  777. Response to "
  778. ImmediateParentSubject"
  779.     0R1S2S3S4S5S6S
  780. NewDocTitle
  781. StandardTitle
  782.     0R4S6S
  783. "MS Sans Serif
  784. Times New Roman
  785.  Response to Response
  786. @___@
  787. <a>7`^
  788. `!bb!R
  789. SubjectKey thought of this response
  790.     Created by:
  791. FromThe name of the person who composed the response
  792. DateThe date/time when the document was composed
  793. TimeCreated
  794. ExpireDate
  795.     1S2S
  796. The document and its responses will be archived 
  797. on a schedule determined by the Archive Profile
  798.     This document was marked expired on
  799. ExpireDate
  800. ExpireDateDisplay
  801. @___@
  802. <a>7`^
  803. `!bb!R
  804. BodyEnter the text of your response
  805.     -------------------------------------------------------------------------------------------------------------------------------------------------
  806.     Hidden Fields:    
  807. OriginalSubject
  808. OriginalSubject
  809. Subject
  810.     7S9S
  811. OriginalSubjectHidden field to store topic of Main Document
  812. Subject
  813. Subject
  814. OriginalSubject
  815.     7S9S
  816. ImmediateParentSubject
  817. Closeu 
  818.     0S0E
  819. _Edit Document
  820. Categori_ze
  821. Send Docu_ment
  822. _Forward
  823. _Move to Folder...
  824. _Remove from Folder
  825. O=Lotus Notes
  826. O=Lotus Notes
  827. PURSAFO
  828. |.:#U
  829. O=Lotus Notes
  830. CN=Lotus Notes Template Development/O=Lotus Notes
  831. PURSAFO
  832. Fde!f^^
  833. $TITLE
  834. $Info
  835. $WindowTitle
  836. $$Script_O
  837. $$ScriptName
  838. TimeCreated
  839. $Body
  840. $ACTIONS
  841. nV$DesignVersion$Version$Formula$FormulaClass$Collation$UpdatedBy$TITLE$AssistType$AssistLastRun$AssistDocCount$Comment$AssistFlags$AssistTrigger$AssistInfo$AssistQuery$AssistAction$AssistAction_Ex$Flags$AssistRunInfo$AssistVersion$Signature$Info$Fonts$Body$ACLDigest$FlagsNoRefreshIconBitmap$TYPE$Index$Collation1$Collation2$VIEWFORMAT$ACTIONS$Collation3$Collation4$Name$FolderObject$FolderIDTable$ViewMapDataset$ViewMapLayout$WindowTitle$$Script_O$$ScriptNameSubjectFromDateTimeCreatedBodyOriginalSubjectImmediateParentSubjectReviewTime_1ReviewStyleReviewWindowNotifyAfterReviewTimeSaveChoices$Script$$FormScript$$$FormScript_ODocumentAuthorsDocumentReadersLastEditor$SubForms$$Reviewers$Reviewers_OCategoriesPreviousReviewersCURRENTREVIEWERSFutureReviewersReviewersReviewerLog$$XMB$$XMB_2$$XMB_3$Licensee$Operation$Scan$LeftToDoDocLife$ManualArchivers_OObsoleteLifeDocumentLife$MessageTypeLogCountLogTotalArchiveDateArchiveTrailerArchiveExpiredExpiredLifeArchiveInactiveArchiveLogIncludeDoclinksProfileEditors$SCRIPTOBJ_6DeleteOptionsArchiveLocationArchiveServerArchivePathCopyOptions$SCRIPTOBJ_10$ViewGlobalScript_O
  842. Times New Roman
  843.  ReviewOptions
  844. Review style:
  845. ReviewStyle
  846. ReviewStyle
  847. Serial review | Serial.NoVersionsSerial (keep all revisions) | Serial.VersionsDocument reservations | Parallel.NoVersionsResponse review | Parallel.Versions
  848. ReviewWindow
  849. ReviewWindow
  850. No time limit on review | NoLimitMove to next reviewer after | MoveOnKeep sending reminders after | Reminder
  851. Allotted time:
  852. Notification:
  853. NofityAfter
  854. NotifyAfter
  855. Notify me after each reviewer | EachNotify me after final reviewer | Final
  856. ReviewWindow
  857. NoLimit
  858.     1S2S
  859. ReviewTime
  860. ReviewWindow
  861. NoLimit
  862. ReviewTime
  863. ReviewTime
  864.     3S4S6S8S14S
  865. ReviewWindow
  866. NoLimit
  867. ReviewTimeX
  868. Please enter a number.{
  869. ReviewTimeX
  870. Please enter a whole number which is greater than zero.
  871.     3S4S6S8S16S21S25S26S28S33S
  872. ReviewTime
  873. day(s)
  874. SaveChoices
  875. SaveChoices
  876. Save choices for next time. | 1
  877. Categori_ze
  878. _Edit Document
  879. Send Docu_ment
  880. _Forward
  881. _Move to Folder...
  882. _Remove from Folder$
  883. O=Lotus Notes
  884. O=Lotus Notes
  885. PURSAFO
  886. |.:#U
  887. O=Lotus Notes
  888. CN=Lotus Notes Template Development/O=Lotus Notes
  889. PURSAFO
  890. Fde!f^^
  891. ReviewTime_1
  892. $TITLE
  893. $Info
  894. $$ScriptName
  895. $Body
  896. $ACTIONS
  897. '++LotusScript Development Environment:2:5:(Options):0:74
  898. Option Public
  899. '++LotusScript Development Environment:2:5:(Forward):0:1
  900. Declare Sub InitializeDocument(source)
  901. Declare Sub InitializeStatusList
  902. Declare Sub RebuildList(InputList As Variant)
  903. Declare Sub SetReviewerLists
  904. Declare Sub SendNotification
  905. Declare Sub InitiateReview(source)
  906. Declare Sub GetReviewSequence
  907. Declare Sub ResetAuthorNames
  908. '++LotusScript Development Environment:2:5:(Declarations):0:10
  909. '***** OBJECT VARIABLES *****
  910. Dim s As NotesSession
  911. Dim w As NotesUIWorkspace
  912. Dim doc As NotesUIDocument
  913. Dim db As NotesDatabase
  914. Dim note As NotesDocument
  915. Dim tempnote As NotesDocument
  916. Dim maildoc As NotesDocument
  917. Dim parent As NotesDocument
  918. Dim child As NotesDocument
  919. Dim children As NotesDocumentCollection
  920. Dim item As NotesItem
  921. Dim rtitem As NotesRichTextItem
  922. Dim dt As NotesDateTime
  923. '***** DATA VARIABLES - FIELDS DEFINED ON FORM*****
  924. Dim ReviewStyle As Variant
  925. Dim ReviewSeq As Variant
  926. Dim Reviewers As Variant
  927. Dim PreviousReviewers As Variant
  928. Dim FutureReviewers As Variant
  929. Dim CurrentReviewers As Variant
  930. Dim DocumentAuthors As Variant
  931. Dim Originator As Variant
  932. Dim Versioning As Variant
  933. '***** DATA VARIABLE - FIELDS DEFINED IN SCRIPT, NOT DEFINED ON FORM
  934. Dim Status As Variant
  935. Dim Locked As Variant
  936. Dim InProcess As Variant
  937. '***** SCRIPT PROCESSING VARIABLES *****
  938. Dim ReviewerList() As Variant
  939. Dim OldList() As Variant
  940. Dim InputList As Variant
  941. Dim NewList() As Variant
  942. Dim ListMax As Integer
  943. Dim tmpList As Variant
  944. Dim CompareValue As Variant
  945. Dim Elements As Integer
  946. Dim DocWasSaved As Integer
  947. Dim ParentIsLocked As Integer
  948. Dim DocIsLocked As Integer
  949. Dim LockedBy As Variant
  950. Dim InitiatingReview As Integer
  951. Dim CompareValueFound As Integer
  952. Dim FinalSave As Variant
  953. '***** TEMP PROCESSING FIELDS - ADDED TO DOC ON OPEN, DELETED ON CLOSE*****
  954. Dim CurrentUser As String
  955. Dim Action As Variant
  956. Dim StatusList(1 To 4) As Variant
  957. '++LotusScript Development Environment:2:2:InitializeDocument:1:8
  958. Sub InitializeDocument(source)
  959.      
  960. 'This routine initializes object variables, global variables and some field values     
  961.      
  962. 'Turn off Autoreload to speed up response time (this means we need to do manual reloads and refreshes)
  963.      source.AutoReload = False
  964.      
  965.      Set w = New NotesUIWorkspace
  966.      Set s = New NotesSession
  967.      Set db = s.CurrentDatabase
  968.      Set note = source.Document
  969.      
  970.      CurrentUser = s.CommonUserName
  971.      note.tmpCurrentUser = CurrentUser
  972.      Originator = note.From
  973.      
  974.      InitializeStatusList
  975.      If source.IsNewDoc Then
  976.           note.Status = StatusList(1)
  977.           note.Scope = "Public"
  978.      Else
  979.           If note.Locked(0) <> "" Then
  980.                DocIsLocked = True
  981.                LockedBy = note.Locked
  982.           End If
  983.      End If
  984.      
  985. 'Initialize V3 documents
  986.      If Not(note.HasItem("Status")) Then
  987.           note.Status = StatusList(1)
  988.           note.Scope = "Public"
  989.           note.DocumentAuthors = s.CommonUserName
  990.           note.From = Evaluate("@Name([CN]; From)", note)
  991.      End If
  992.      
  993. 'Clear the status bar     
  994.      Print
  995.      
  996. End Sub
  997. '++LotusScript Development Environment:2:2:InitializeStatusList:1:8
  998. Sub InitializeStatusList
  999.      
  1000. 'Statuses are referred to positionally.  If you want the works to display differently in the view (like if you want the first
  1001. 'status to be None instead of New) you would change them here.     
  1002.      StatusList(1) = "New"
  1003.      StatusList(2) = "Ready for Review"
  1004.      StatusList(3) = "In Review"
  1005.      StatusList(4) = "Review Complete"
  1006.      
  1007.      note.StatusList = StatusList
  1008.      
  1009. End Sub
  1010. '++LotusScript Development Environment:2:2:RebuildList:1:8
  1011. Sub RebuildList(InputList As Variant)
  1012.      
  1013. 'This routine removes a value from a list (passed by reference)
  1014.      
  1015.      ListMax = Ubound(InputList)
  1016.      
  1017. 'Save original capitalization in OldList then lowercase both InputList and CompareValue     
  1018.      Redim OldList (ListMax)
  1019.      For i = 0 To ListMax
  1020.           OldList(i) = InputList(i)
  1021.           InputList(i) = Lcase(InputList(i))
  1022.      Next
  1023.      CompareValue = Lcase(CompareValue)
  1024.      
  1025.      Redim NewList (ListMax)
  1026.      x = 0 
  1027.      For y = 0 To ListMax
  1028.           If InputList(y) <> CompareValue Then
  1029.                NewList(x) = OldList(y)
  1030.                x = x + 1
  1031.           End If
  1032.      Next
  1033.      
  1034.      If x > 0 Then
  1035.           Redim Preserve NewList(x-1)
  1036.           tmpList = NewList
  1037.      Else
  1038.           tmpList = "None"
  1039.      End If
  1040.      
  1041.      If x = ListMax Then
  1042.           CompareValueFound = True
  1043.      Else
  1044.           CompareValueFound = False
  1045.      End If
  1046.      
  1047. End Sub
  1048. '++LotusScript Development Environment:2:2:SetReviewerLists:1:8
  1049. Sub SetReviewerLists
  1050.      
  1051.      Print "Updating Reviewer Lists"
  1052.      
  1053.    For a Parallel submit, set CurrentReviewers to the Reviewers field (there are no
  1054.       FutureReviewers - all reviewers are current) and set FutureReviewers to "None".
  1055.    For a Parallel review, remove CurrentUser from CurrentReviewers and add it to
  1056.       PreviousReviewers.
  1057.    For a Serial submit, set CurrentReviewers to the first Reviewer and set FutureReviewers
  1058.       to the Reviewers field minus the first Reviewer
  1059.    For a Serial review remove CurrentUser from FutureReviewers and add it to
  1060.       PreviousReviewers.
  1061. %ENDREM
  1062.      
  1063.      ListMax = 0
  1064.      Set dt = New NotesDateTime("")
  1065.      dt.SetNow
  1066.      If Action(0) = "Complete" Then ReviewerLogEntry = CurrentUser & " on " & Format(dt.LSLocalTime, "Short Date")
  1067.      
  1068.      Select Case ReviewSeq
  1069.      Case "Parallel"
  1070. 'On submit Set future reviewers to None since all reviewers are current          
  1071.           If Action(0) = "Submit" Then
  1072.                Reviewers = note.Reviewers            
  1073.                tmpList = Reviewers
  1074.                note.FutureReviewers = "None"
  1075.           Else
  1076. '(this is for action = Complete)               
  1077. 'For Response Reviews, we maintain the status in the parent               
  1078.                If note.IsResponse Then
  1079.                     CurrentReviewers = parent.CurrentReviewers
  1080.                     Set item = parent.GetFirstItem("ReviewerLog")
  1081.                Else
  1082.                     CurrentReviewers = note.CurrentReviewers
  1083.                     Set item = note.GetFirstItem("ReviewerLog")
  1084.                End If
  1085.                item.AppendToTextList(ReviewerLogEntry)              
  1086.                CompareValue = CurrentUser
  1087. 'Remove the CurrentUser from the CurrentReviewers list               
  1088.                Call RebuildList(CurrentReviewers)
  1089.           End If
  1090.           FieldName = "CurrentReviewers"
  1091.      Case "Serial"
  1092. 'On submit, put all reviewers in the future reviewers list          
  1093.           If Action(0) = "Submit" Then
  1094.                Reviewers = note.Reviewers
  1095.                tmpList = Reviewers
  1096.                Call note.ReplaceItemValue("FutureReviewers", tmpList)
  1097.           Else
  1098.                Set item = note.GetFirstItem("ReviewerLog")
  1099.                item.AppendToTextList(ReviewerLogEntry)
  1100.           End If
  1101.           FutureReviewers = note.FutureReviewers
  1102. 'Put the first person in the future reviewers list in current reviewer
  1103. 'On submit this makes the first one current, on Complet it makes the next one current          
  1104.           note.CurrentReviewers = FutureReviewers(0)
  1105.           CompareValue = FutureReviewers(0)
  1106.           FieldName = "FutureReviewers"
  1107. 'Remove the first element from the FutureReviewers list
  1108.           Call RebuildList(FutureReviewers)
  1109.      End Select
  1110.      
  1111. 'Calculate when the review is due, based upon ReviewTime     
  1112.      ReviewTime = note.ReviewTime
  1113.      temp = ReviewTime(0)
  1114.      Set dt = New NotesDateTime("")
  1115.      dt.SetNow
  1116.      If Isnumeric(ReviewTime(0)) Then dt.AdjustDay(temp)
  1117.      
  1118. 'Update DueDate - If there is a Review time then reset, otherwise delete
  1119. 'Update PreviousReviewers to None if this is a submit, otherwise add CurrentUser to existing list
  1120.      If note.IsResponse And ReviewSeq = "Parallel" Then
  1121.           If Isnumeric(ReviewTime(0)) Then
  1122.                parent.DueDateTime = dt.LSLocalTime
  1123.           Else
  1124.                parent.RemoveItem("DueDateTime")
  1125.           End If
  1126.           Call parent.ReplaceItemValue(FieldName, tmpList)
  1127.           PreviousReviewers = parent.PreviousReviewers
  1128.           If PreviousReviewers(0) = "None" Then
  1129.                parent.PreviousReviewers = CurrentUser
  1130.           Else
  1131.                Set item = parent.GetFirstItem("PreviousReviewers")
  1132.                item.AppendToTextList (CurrentUser)
  1133.           End If
  1134. 'In a response review, we remove these because they are stored in the main doc          
  1135.           note.RemoveItem("PreviousReviewers")
  1136.           note.RemoveItem("CurrentReviewers")
  1137.           note.RemoveItem("FutureReviewers")
  1138.           If Action(0) = "Complete" Then
  1139.                note.RemoveItem("DueDateTime")
  1140.                note.Status = StatusList(4)
  1141.           End If
  1142.      Else
  1143.           If Isnumeric(ReviewTime(0)) Then 
  1144.                note.DueDateTime = dt.LSLocalTime
  1145.           Else
  1146.                note.RemoveItem("DueDateTime")
  1147.           End If
  1148.           Call note.ReplaceItemValue(FieldName, tmpList)
  1149.           If Action(0) = "Submit" Then
  1150.                note.PreviousReviewers = "None"
  1151.           Else
  1152.                PreviousReviewers = note.PreviousReviewers
  1153.                If PreviousReviewers(0) = "None" Then
  1154.                     note.PreviousReviewers = CurrentUser
  1155.                Else              
  1156.                     Set item = note.GetFirstItem("PreviousReviewers")
  1157.                     item.AppendToTextList (CurrentUser)
  1158.                End If
  1159.           End If
  1160.      End If
  1161.      
  1162. End Sub 
  1163. '++LotusScript Development Environment:2:2:SendNotification:1:8
  1164. Sub SendNotification
  1165.      
  1166. 'This routine sets the content of the notification email, based upon values set in SetReviewerLists.     
  1167.      
  1168.      If note.IsResponse Then
  1169.           CurrentReviewers = parent.CurrentReviewers
  1170.      Else
  1171.           CurrentReviewers = note.CurrentReviewers
  1172.      End If
  1173.      DbTitle = db.Title
  1174.      DueDateTime = note.DueDateTime
  1175.      Subject = note.Subject
  1176.      Recipient = Empty
  1177.      NotifyAfter = note.NotifyAfter
  1178.      
  1179. 'If it is a parallel review with only final notification to the originator, 
  1180. 'there is not need to send mail on a normal completion     
  1181.      If (ReviewSeq = "Parallel") And (CurrentReviewers(0) <> "None") _
  1182.      And (NotifyAfter(0) = "Final") And (Action(0) <> "Submit") Then
  1183.           Exit Sub
  1184.      Else
  1185.           Print "Sending Notification"
  1186.      End If
  1187.      
  1188.      Set maildoc = New NotesDocument(db)
  1189.      Set rtitem = New NotesRichTextItem(maildoc, "Body")
  1190.      
  1191.      Select Case Action(0)
  1192.      Case "Submit"
  1193.           tmpList = CurrentReviewers
  1194.           tmpSubject = "Document Requires Review:  " & Subject(0)
  1195.           If note.HasItem("DueDateTime") Then
  1196.                tmpFlowStatus = "Please take the time to review this document before the due date shown below."              
  1197.           Else
  1198.                tmpFlowStatus = "Please take the time to review this document."
  1199.           End If
  1200.           tmpMessagebox = "Request for review has been sent to "
  1201.           If ReviewSeq = "Parallel" Then
  1202.                tmpRecipient = "All Reviewers"
  1203.           Else
  1204.                tmpRecipient = CurrentReviewers(0)         
  1205.           End If
  1206.      Case "Complete"
  1207.           If CurrentReviewers(0) = "None" Then
  1208.                tmpList = Originator(0)
  1209.                tmpSubject = "Review is complete for:  " & Subject(0)
  1210.                tmpFlowStatus = "All reviewers have completed their work on this document."
  1211.                tmpMessagebox = "Notification that you have completed your review has been sent to the originator: "               
  1212.           Else
  1213.                Select Case ReviewSeq
  1214.                Case "Parallel"     
  1215.                     tmpList = Originator(0)              
  1216.                     tmpFlowStatus = CurrentUser & " is finished reviewing this document."              
  1217.                     tmpSubject = CurrentUser & " has completed review of:  " & Subject(0)
  1218.                     tmpMessagebox = "Notification that you have completed your review has been sent to the originator, "
  1219.                Case "Serial"
  1220.                     tmpList = CurrentReviewers(0)
  1221.                     tmpSubject = "Document Requires Review:  " & Subject(0)
  1222.                     If note.HasItem("DueDateTime") Then
  1223.                          tmpFlowStatus = Originator(0) & " requests that you review this document before the due date shown below."            
  1224.                     Else
  1225.                          tmpFlowStatus = Originator(0) & " requests that you review this document."              
  1226.                     End If
  1227.                     tmpMessagebox = "Notification that you have completed your review has been sent to "               
  1228.                     If NotifyAfter(0) = "Each" Then 
  1229.                          maildoc.CopyTo = Originator(0)
  1230.                          tmpRecipient = tmpList & " and " & Originator(0)
  1231.                     End If
  1232.                End Select
  1233.           End If
  1234.           If tmpRecipient = "" Then tmpRecipient = tmpList
  1235.      End Select
  1236.      
  1237.      Call maildoc.AppendItemValue("SendTo", tmpList)
  1238.      
  1239.      maildoc.Subject = tmpSubject
  1240.      maildoc.InheritedSubject = Subject(0)
  1241.      maildoc.InheritedDbTitle = DbTitle
  1242.      maildoc.FlowStatus = tmpFlowStatus
  1243.      If note.HasItem("DueDateTime") Then maildoc.DueDateTime = Format(DueDateTime(0), "Short Date")
  1244.      
  1245.      If note.IsResponse Then
  1246.           Call rtitem.AppendDocLink(parent, "DocLink to " & Subject(0))
  1247.      Else
  1248.           Call rtitem.AppendDocLink(note, "DocLink to " & Subject(0))
  1249.      End If
  1250.      
  1251.      maildoc.Form = "Bookmark"
  1252.      
  1253.      On Error Goto SendError
  1254.      Call maildoc.Send (False)
  1255.      
  1256.      Messagebox tmpMessagebox & tmpRecipient & ".", 0 + 64, "Document Library"
  1257.      
  1258.      Exit Sub
  1259.      
  1260. SendError:
  1261.      Messagebox "FYI:  " & tmpRecipient & " could not be notified via email at this time.", 0 + 64, "Document Library"
  1262.      Exit Sub
  1263.      
  1264. End Sub
  1265. '++LotusScript Development Environment:2:2:InitiateReview:1:8
  1266. Sub InitiateReview(source)
  1267.      
  1268. 'This routine does the versioning that occurs when a review in initiated (as opposed to on every save)     
  1269.      InProcess = note.InProcess
  1270.      Reviewers = note.Reviewers
  1271.      PreviousReviewers = note.PreviousReviewers
  1272.      
  1273. 'Check to see if CurrentUser is in the InProcess list.  If they are (or if this is the originator) then do not do versioning     
  1274.      Redim ReviewerList(0) 
  1275.      Forall n In InProcess
  1276.           If CurrentUser = n Then ReviewerList(0) = CurrentUser
  1277.      End Forall
  1278.      
  1279. 'Find out what kind of review we are processing     
  1280.      GetReviewSequence
  1281.      
  1282.      If ReviewerList(0) = CurrentUser Or CurrentUser = Originator(0) Then Exit Sub
  1283.      Print "Initiating Review"
  1284.      
  1285. 'Set the $VersionOpt appropriately
  1286.      If (Versioning = "Versions") Then
  1287.           If ReviewSeq = "Parallel" Then
  1288. 'This doc becomes a response (we are subsequently editting the response doc)
  1289.                VersionOpt = "1"
  1290.           Else
  1291. 'Previous versions become response (we are still editing the main doc)               
  1292.                VersionOpt = "3"
  1293.           End If
  1294.      Else
  1295. 'The original doc is saved as a response (for safe keeping)          
  1296.           If PreviousReviewers(0) = "None" And Not(note.HasItem("$VersionOpt")) Then VersionOpt = "3"
  1297.      End If
  1298.      
  1299. 'Reset the field
  1300.      If (Versioning = "Versions") Or (PreviousReviewers(0) = "None") Then Call note.ReplaceItemValue("$VersionOpt", VersionOpt)
  1301.      
  1302. 'CurrentUser is now on the InProcess list because they are actively reviewing the doc     
  1303.      Set item = note.GetFirstItem("InProcess")
  1304.      If item Is Nothing Then
  1305.           Call note.AppendItemValue("InProcess", CurrentUser)
  1306.      Else
  1307.           item.AppendToTextList(CurrentUser)
  1308.      End If
  1309.      
  1310. 'InitiatingReview flag tells the Querysave event how to process, reload from the backend, 
  1311. 'and save from the front end to create the appropriate version     
  1312.      InitiatingReview = True
  1313.      source.Reload
  1314.      If VersionOpt = 1 Or VersionOpt = 3 Then
  1315.           source.Refresh
  1316.           source.SaveNewVersion
  1317.      End If
  1318.      source.RefreshHideFormulas
  1319.      InitiatingReview = False
  1320.      
  1321.      Print
  1322.      
  1323. End Sub
  1324. '++LotusScript Development Environment:2:2:GetReviewSequence:1:8
  1325. Sub GetReviewSequence
  1326.      
  1327. 'ReviewSequence is stored in a manner that makes sense to users.  Here it is dealt with as serial or parallel,
  1328. 'with or without versioning.
  1329.      
  1330.      ReviewStyle = note.ReviewStyle
  1331.      
  1332.      position = Instr(ReviewStyle(0), ".")
  1333.      ReviewSeq = Left(ReviewStyle(0), position - 1)
  1334.      Versioning = Mid(ReviewStyle(0), position + 1)    
  1335.      
  1336. End Sub
  1337. '++LotusScript Development Environment:2:2:ResetAuthorNames:1:8
  1338. Sub ResetAuthorNames
  1339.      
  1340.      Select Case ReviewSeq
  1341.      Case "Serial"
  1342. 'Reset author names to CurrentReviewers + Originator (unless CurrentReviewers = "None")
  1343.           If CurrentReviewers(0) = "None" Then
  1344.                note.DocumentAuthors = Originator(0)
  1345.           Else
  1346.                CompareValue = Empty
  1347.                Call RebuildList(CurrentReviewers)
  1348.                Redim Preserve NewList(ListMax+1)
  1349.                NewList(ListMax+1) = Originator(0)
  1350.                tmpList = NewList
  1351.                note.DocumentAuthors = tmpList
  1352.           End If
  1353. 'If there are versions, remove it from them as well          
  1354.           If note.HasItem("$VersionOpt") Then
  1355.                Set children = note.Responses
  1356.                For c = 1 To children.Count
  1357.                     Set child = children.GetNthDocument(c)
  1358.                     child.DocumentAuthors = Originator(0)
  1359.                     If child.DocumentReaders(0) = "" Then child.RemoveItem("DocumentReaders")
  1360. 'It does not matter if it can not be saved because CurrentUser may not be in the AuthorNames field in all responses
  1361.                     On Error Resume Next
  1362.                     child.Save True, True
  1363.                     Err = 0
  1364.                Next
  1365.           End If
  1366.      Case "Parallel"
  1367.           If note.IsResponse Then
  1368. 'If all done we are updating the parent and the originator is the only editor
  1369. 'otherwise CurrentUser and originator are the editors of this doc
  1370.                If Action(0) = "Complete" Then
  1371.                     note.DocumentAuthors = Originator(0)
  1372.                     parentid = note.ParentDocumentUNID
  1373.                     Set parent = db.GetDocumentByUNID(parentid)
  1374.                     DocumentAuthors = parent.DocumentAuthors
  1375.                     CompareValue = CurrentUser
  1376.                     Call RebuildList(DocumentAuthors)
  1377.                     parent.DocumentAuthors = tmpList
  1378.                     If parent.DocumentReaders(0) = "" Then parent.RemoveItem("DocumentReaders")
  1379.                     parent.Save True, True
  1380.                Else
  1381.                     Redim NewList(1)
  1382.                     NewList(0) = CurrentUser
  1383.                     NewList(1) = Originator(0)
  1384.                     tmpList = NewList
  1385.                     note.DocumentAuthors = tmpList
  1386.                End If
  1387.           Else
  1388. 'If we are not versioning - then all current reviewers and the originator are editors (unless CurrentReviewer = "None")
  1389.                If CurrentReviewers(0) = "None" Then
  1390.                     note.DocumentAuthors = Originator(0)
  1391.                Else
  1392.                     CompareValue = Empty
  1393.                     Call RebuildList(CurrentReviewers)
  1394.                     Redim Preserve NewList(ListMax+1)
  1395.                     NewList(ListMax+1) = Originator(0)
  1396.                     tmpList = NewList
  1397.                     note.DocumentAuthors = tmpList
  1398.                End If
  1399. 'If there are versions, remove it from them as well          
  1400.                If note.HasItem("$VersionOpt") Then
  1401.                     Set children = note.Responses
  1402.                     For c = 1 To children.Count
  1403.                          Set child = children.GetNthDocument(c)
  1404.                          child.DocumentAuthors = Originator(0)
  1405.                          If child.DocumentReaders(0) = "" Then child.RemoveItem("DocumentReaders")
  1406.                          child.RemoveItem("Locked")
  1407. 'It does not matter if it can not be saved because CurrentUser may not be in the AuthorNames field in all responses
  1408.                          On Error Resume Next
  1409.                          child.Save True, True
  1410.                          Err = 0
  1411.                     Next
  1412.                End If
  1413.           End If
  1414.      End Select
  1415.      
  1416. End Sub
  1417. K$    Qh
  1418. K$    Qh
  1419. DocumentWorkflow'++LotusScript Development Environment:2:5:(Options):0:66
  1420. '++LotusScript Development Environment:2:5:(Forward):0:1
  1421. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1422. Declare Sub Postopen(Source As Notesuidocument)
  1423. Declare Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
  1424. Declare Sub Postmodechange(Source As Notesuidocument)
  1425. Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)
  1426. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  1427. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1428. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1429. Private Sub BindEvents(Byval Objectname_ As String)
  1430.      Static Source As NOTESUIDOCUMENT
  1431.      Set Source = Bind(Objectname_)
  1432.      On Event Queryopen From Source Call Queryopen
  1433.      On Event Postopen From Source Call Postopen
  1434.      On Event Querymodechange From Source Call Querymodechange
  1435.      On Event Postmodechange From Source Call Postmodechange
  1436.      On Event Querysave From Source Call Querysave
  1437.      On Event Queryclose From Source Call Queryclose
  1438. End Sub
  1439. '++LotusScript Development Environment:2:2:Queryopen:1:12
  1440. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  1441.      
  1442. 'If it is a new doc, there is no note yet, so we cannot initialize it from here
  1443.      If IsNewDoc Then Exit Sub
  1444.      
  1445.      Call InitializeDocument(source)    
  1446.      
  1447.      If Mode = 1 Then
  1448.           If DocIsLocked Then
  1449.                Messagebox "This document is being edited by " & LockedBy(0) & ".  Please try later.",_
  1450.                0 + 48, "Document Library"
  1451.                Continue = False
  1452.           Else
  1453. 'If this is a Document Reservations review, then lock this doc     
  1454.                If note.ReviewStyle(0) = "Parallel.NoVersions" Then
  1455.                     note.Locked = CurrentUser
  1456.                     note.DocumentAuthors = CurrentUser
  1457.                     If note.DocumentReaders(0) = "" Then note.RemoveItem("DocumentReaders")
  1458.                     On Error Goto SaveError
  1459.                     note.save True, True
  1460.                End If
  1461.           End If
  1462.      End If
  1463.      
  1464.      Exit Sub
  1465.      
  1466. SaveError:
  1467.      
  1468.      Messagebox "This document is currently in use.  Please try later.",_
  1469.      0 + 48, "Document Library"
  1470.      Continue = False
  1471.      Exit Sub
  1472.      
  1473. End Sub
  1474. '++LotusScript Development Environment:2:2:Postopen:1:12
  1475. Sub Postopen(Source As Notesuidocument)
  1476.      
  1477. 'This allows us to reference the UI Document in areas where source represents a different object     
  1478.      Set doc = source
  1479.      
  1480. 'If it is a new doc, we initialize it here.  Existing docs are initialized in Queryopen because it is faster (one less refresh is required)    
  1481.      If source.IsNewDoc Then
  1482.           Call InitializeDocument(source)
  1483.           source.Reload
  1484.           source.RefreshHideFormulas
  1485.      Else
  1486. 'If the doc was opened in edit mode, it may be a review initiation (this routine is also executed on mode change)         
  1487.           If source.EditMode = True Then
  1488.                Status = note.Status
  1489.                If Status(0) = StatusList(3) Then Call InitiateReview(source)
  1490.           End If         
  1491.      End If
  1492.      
  1493. End Sub
  1494. '++LotusScript Development Environment:2:2:Querymodechange:1:12
  1495. Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
  1496.      
  1497. 'If the doc is locked, do not allow them to put in in edit mode     
  1498.      If source.EditMode = False And note.ReviewStyle(0) = "Parallel.NoVersions" Then
  1499.           If Not DocIsLocked Then
  1500.                SavedUNID = note.UniversalId
  1501.                Delete note
  1502.                Set tempnote = db.GetDocumentByUNID(SavedUNID)
  1503.                If tempnote.HasItem("Locked") Then 
  1504.                     DocIsLocked = True
  1505.                     LockedBy = tempnote.Locked
  1506.                End If                   
  1507.                Delete tempnote
  1508.                Set note = source.Document
  1509.           End If
  1510.           If DocIsLocked Then
  1511.                Messagebox "This document is being edited by " & LockedBy(0) & ".  Please try later.",_
  1512.                0 + 48, "Document Library"
  1513.                Continue = False
  1514.           Else
  1515.                note.Locked = CurrentUser
  1516.                note.DocumentAuthors = CurrentUser
  1517.                If note.DocumentReaders(0) = "" Then note.RemoveItem("DocumentReaders")
  1518.                On Error Goto SaveError
  1519.                note.save True, True
  1520.           End If
  1521.      End If
  1522.      
  1523.      Exit Sub
  1524.      
  1525. SaveError:
  1526.      
  1527.      Messagebox "This document is currently in use.  Please try later.",_
  1528.      0 + 48, "Document Library"
  1529.      Continue = False
  1530.      Exit Sub
  1531.      
  1532. End Sub
  1533. '++LotusScript Development Environment:2:2:Postmodechange:1:12
  1534. Sub Postmodechange(Source As Notesuidocument)
  1535.      
  1536. 'Putting the doc in edit mode might be a review initiation (this routine is also executed if the doc is opend in edit mode)
  1537.      If Source.EditMode = True Then
  1538.           Status = note.Status
  1539.           If Status(0) = StatusList(3) Then Call InitiateReview(source)
  1540.      End If
  1541.      
  1542. End Sub
  1543. '++LotusScript Development Environment:2:2:Querysave:1:12
  1544. Sub Querysave(Source As Notesuidocument, Continue As Variant)
  1545.      
  1546.      If FinalSave Then Exit Sub
  1547.      
  1548.      On Error Resume Next
  1549.      
  1550. 'All routing logic is driven from here.  The Action buttons set the tmpAction value which drives processing.
  1551.      Status = note.Status
  1552.      
  1553. 'If Subject is blank, be sure they enter it here     
  1554.      Subject = note.Subject
  1555.      If Subject(0) = "" Then
  1556.           Subject(0) = Inputbox("Please enter a Title for this document.", "Document Library", "(Untitled)")
  1557.           If Subject(0) = "" Then
  1558.                Continue = False
  1559.                Exit Sub
  1560.           End If
  1561.      End If
  1562.      note.Subject = Subject(0)
  1563.      
  1564. 'Be sure that versions do not get $Ref stripped off
  1565.      If note.IsResponse Then Call note.ReplaceItemValue("$RefOptions", "1")
  1566.      
  1567. 'InitiatingReview means that they are saving in order to generate a new version
  1568. 'Status 1 means there is no review cycle.  In both cases we don't need to execute the rest of the logic here.     
  1569.      If InitiatingReview Or Status(0) = StatusList(1) Then
  1570.           source.Reload
  1571.           Exit Sub
  1572.      Else
  1573.           Print "Saving Document"
  1574.      End If      
  1575.      
  1576. 'Find out which kind of a review we are doing     
  1577.      GetReviewSequence
  1578.      
  1579. 'Get the Action type and the Reviewer list     
  1580.      Action = note.tmpAction
  1581.      Reviewers = note.Reviewers
  1582.      
  1583. 'Decide how to process based on which Action button was pressed
  1584.      Select Case Action(0)
  1585. 'On Submit - build the current and future reviewer lists and send notification to the appropriate person(s)          
  1586.      Case "Submit"
  1587.           note.Status = StatusList(3)
  1588.           SetReviewerLists        
  1589.           SendNotification
  1590. 'On Completion of a review - if it is a response, lock the parent because we are going to update it
  1591.      Case "Complete"
  1592.           If note.IsResponse Then
  1593.                parentid = note.ParentDocumentUNID
  1594.                Set parent = db.GetDocumentByUNID(parentid)
  1595.                parent.Locked = CurrentUser
  1596.                ParentIsLocked = True
  1597.                parent.save True, True
  1598.           End If
  1599. 'Rebuild the previous, current, and future reviewer lists and send notificationto the appropriate person(s)
  1600.           SetReviewerLists
  1601.           SendNotification
  1602. 'Get the name of the person(s) currently reviewing this document (actively reviewing it means they have started
  1603. 'reviewing it, rather than just being on the CurrentReviewer list)          
  1604.           InProcess = note.InProcess
  1605.           CompareValue = CurrentUser
  1606. 'Pull CurrentUser out of the InProcess list          
  1607.           Call RebuildList(InProcess)
  1608.           Call note.ReplaceItemValue("InProcess", tmpList)
  1609.           CurrentReviewers = note.CurrentReviewers
  1610. 'If CurrentReviewers = None (already set in the SetReviewerLists routine) then all reviews are complete so reset status
  1611.           If CurrentReviewers(0) = "None" Then note.Status = StatusList(4)
  1612. 'If the parent is locked then unlock it          
  1613.           If ParentIsLocked Then
  1614.                CurrentReviewers = parent.CurrentReviewers
  1615.                If CurrentReviewers(0) = "None" Then
  1616.                     parent.Status = StatusList(4)
  1617.                     parent.RemoveItem("DueDate")
  1618.                End If
  1619.                parent.RemoveItem("Locked")
  1620.                ParentIsLocked = False
  1621.                parent.Save True, True
  1622.           End If
  1623.      End Select
  1624.      
  1625. 'Reset $VersionOpt to 0 to prevent further versioning
  1626.      If note.HasItem("$VersionOpt") Then Call note.ReplaceItemValue("$VersionOpt", "0")
  1627.      
  1628. 'Set the DocWasSaved flag so the Queryclose event knows about it     
  1629.      DocWasSaved = True
  1630.      
  1631.      source.Reload
  1632.      
  1633.      Print
  1634.      
  1635. End Sub
  1636. '++LotusScript Development Environment:2:2:Queryclose:1:12
  1637. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  1638.      
  1639.      On Error Goto ErrorRoutine
  1640.      
  1641. 'If the doc wasn't saved, we do not need to execute the rest of the logic in this event     
  1642.      If DocWasSaved Or note.Locked(0) <> "" Then    
  1643.           Print "Closing Document"
  1644.      Else
  1645.           Exit Sub
  1646.      End If
  1647.      
  1648.      Action = note.tmpAction
  1649.      
  1650. 'A backend save (note.save) saves every field that it knows about, which is every field on the form.  It does not
  1651. 'distinguish between ComputedForDisplay and data fields (the backend classes have no such UI constraints).
  1652. 'Consequently, we delete all ComputedForDisplay and other temporary fields     
  1653.      itemlist = note.Items
  1654.      Forall n In itemlist
  1655.           If Lcase(Left(n.Name, 3)) = "tmp" Then n.Remove
  1656.      End Forall
  1657.      Scope = note.Scope
  1658.      CurrentReviewers = note.CurrentReviewers
  1659.      Status = note.Status
  1660.      
  1661. 'We reset the author names here because the UI save has already occurred (so we can).
  1662. 'The new authornames will take effect the next time the doc is accessed.     
  1663.      If Scope(0) = "Public" Then note.RemoveItem("DocumentReaders")
  1664.      If Status(0) = StatusList(1) Or Status(0) = StatusList(2) Then
  1665.           note.DocumentAuthors = Originator(0)
  1666.      Else
  1667.           ResetAuthorNames
  1668.      End If
  1669.      
  1670.      If note.HasItem("SaveOptions") Then note.RemoveItem("SaveOptions")
  1671.      If note.Locked(0) = CurrentUser Then 
  1672.           note.RemoveItem("Locked")
  1673.      Else
  1674.           If DocIsLocked Then Exit Sub         
  1675.      End If
  1676.      
  1677.      FinalSave = True
  1678.      source.Reload
  1679.      source.Refresh
  1680.      source.Save
  1681.      
  1682.      w.ViewRefresh
  1683.      Print
  1684.      
  1685. ErrorRoutine:
  1686.      Exit Sub
  1687.      
  1688. End Sub
  1689. ,    ,    ,
  1690. `    `    p
  1691. [,    I$
  1692. -<    #8$
  1693.     DocumentWorkflow Subform
  1694.     :  This Subform includes the LotusScript, Actions, and hidden fields which are used in all versions of the Document form.
  1695.     Hidden Fields:-------------------------------------------------------------------
  1696. DocumentAuthors
  1697.     4S6S
  1698. DocumentAuthors
  1699. Scope
  1700. Private
  1701. Reviewers
  1702.     3S4S6S7S8S10SDocumentReaders
  1703. LastEditor
  1704. Mark PrivateF
  1705. Scope
  1706. Private
  1707.     1S2S3S
  1708. Scope
  1709. Private
  1710.     1S2S
  1711. Mark Public&D
  1712. Scope
  1713. Public
  1714.     1S2S3S
  1715. Scope
  1716. Public
  1717. Scope
  1718.     1S2S3S4S
  1719. Submit for Reviewe
  1720. Reviewers
  1721. Reviewers
  1722.     1S2S3S
  1723. Reviewers
  1724. Document Library
  1725. Please indicate who should review this document.
  1726.     0RR6S7S9S15S17S21S
  1727. Reviewers
  1728. Froma
  1729. Document Library
  1730. The Originator cannot be on the reviewer list.
  1731.     0RR9S15S21S23S27S
  1732. tmpAction
  1733. Submit
  1734.     0RR1S2S3S
  1735. SaveOptions
  1736.     0R1S2S3S
  1737. GoToField causes any active embedded objects to de-activate
  1738.     0R1S
  1739.     0R4S
  1740.     0R7S12S>
  1741. Status
  1742. StatusListv
  1743.     5S7S8S
  1744. Setup Review Cycle
  1745. GetReviewCycle
  1746. Status
  1747. StatusList
  1748. ReviewCycle
  1749. ReviewStyle
  1750. ReviewWindow
  1751. ReviewTime
  1752. NotifyAfter
  1753. SaveChoices
  1754.     1S2S5S6S10S13S18S21S22S23S24S25S26S27S28S30S
  1755. ReviewCycle
  1756. GetReviewCycle
  1757. GetReviewCycle
  1758.     0RR1S2S5S6S8S10S14S
  1759. ReviewStyle
  1760. ReviewCycle
  1761. Serial.NoVersions
  1762. ReviewCycle
  1763.     0RR1S2S3S9S10S12S14S18S
  1764. ReviewWindow
  1765. ReviewCycle
  1766. NoLimit
  1767. ReviewCycle
  1768.     0R1S2S3S9S10S12S14S20S23S
  1769. ReviewTime
  1770. ReviewCycle
  1771. ReviewCycle
  1772.     0R1S2S3S9S10S12S14S20S23S
  1773. NotifyAfter
  1774. ReviewCycle
  1775. Final
  1776. ReviewCycle
  1777.     0R1S2S3S9S10S12S14S20S23S
  1778. SaveChoices
  1779. ReviewCycle
  1780. ReviewCycle
  1781.     0R1S2S3S9S10S12S14S18S
  1782. ReviewOptions
  1783. Review Cycle
  1784.     0RR10S12S13S15S20S
  1785. Status
  1786. StatusList
  1787.     0RR1S2S3S9S12S
  1788. ReviewCycle
  1789. SaveChoices
  1790. ReviewStyle
  1791. ReviewWindow
  1792. ReviewTime
  1793. NotifyAfter
  1794. SaveChoices
  1795.     0R1S2S3S6S7S9S11S14S15S16S17S18S19S20S21S23S
  1796. ReviewTime
  1797. ReviewWindow
  1798. NoLimit
  1799. ReviewTimeX
  1800.     0RR1S2S3S6S7S9S11S
  1801. tmpReviewUnits
  1802. ReviewWindow
  1803. NoLimit
  1804. day(s)
  1805.     0R1S2S3S6S7S9S11S
  1806. these are posted commands so that they do not execute until after the section is fully expanded (because the field it is going to is inside the section)
  1807.     0RR1S
  1808. Reviewers
  1809.     0R4S
  1810. tmpCurrentUser
  1811. Status
  1812. StatusListv
  1813.     1S2S6S8S9S13S15S16S
  1814. Clear Review Cycle
  1815. InReview
  1816. Status
  1817. StatusListv
  1818.     1S2S8S10S11S13S15S
  1819. ReviewerList
  1820. InReview
  1821. CurrentReviewers
  1822.     0R1S2S6S8S
  1823. Status
  1824. StatusList
  1825.     0RR1S2S3S7S
  1826. ReviewSequence
  1827. All Reviewers simultaneously
  1828.     0R1S2S3S
  1829. Versioning
  1830. Edit Original Document
  1831.     0R1S2S3S
  1832. NotifyAfter
  1833. Notify Originator after each Reviewer
  1834.     0R1S2S3S
  1835. Reviewers
  1836.     0R1S2S3S
  1837. PreviousReviewers
  1838.     0R1S2S3S
  1839. CurrentReviewers
  1840.     0R1S2S3S
  1841. FutureReviewers
  1842.     0R1S2S3S
  1843. $VersionOpt
  1844.     0R1S2S3S
  1845. InReview
  1846. ReviewerList
  1847. Review of document:  
  1848. Subject
  1849. I no longer require you to review this document.  Thank you for your efforts.
  1850. tmpCurrentUser"
  1851. Subject
  1852.     0RR4S8S10S12S13S14S16S18S19S20S24S26S27S28S29S33S35S36S37S38S40S41S42S45S
  1853. Document Library
  1854. The Review Cycle has been cleared.
  1855.     0RR4S6S
  1856. tmpCurrentUser
  1857. Status
  1858. StatusListv
  1859.     1S2S6S8S9S13S15S16S17S18S19S20S
  1860. My Review is Complete
  1861. tmpAction
  1862. Complete
  1863.     1S2S3S
  1864. SaveOptions
  1865.     0R1S2S3S
  1866. GoToField causes any active embedded objects to de-activate
  1867.     0RR1S
  1868.     0R4S
  1869.     0R7S12S4
  1870. tmpCurrentUser
  1871. InProcess
  1872. O=Lotus Notes
  1873. O=Lotus Notes
  1874. PURSAFO
  1875. |.:#U
  1876. O=Lotus Notes
  1877. CN=Lotus Notes Template Development/O=Lotus Notes
  1878. PURSAFO
  1879. Fde!f^^
  1880. $TITLE
  1881. $Info
  1882. $Script
  1883. $$Script_O
  1884. $$ScriptName
  1885. $$FormScript
  1886. $$$FormScript_O
  1887. $Body
  1888. $ACTIONS
  1889. OriginalSubject
  1890. OriginalSubject
  1891. OriginalSubject
  1892. Subject
  1893.     1S2S3S10S12S
  1894. NewRespTitle
  1895. New Response to "
  1896. OriginalSubject
  1897.     0R1S2S3S4S5S6S
  1898. StandardTitle
  1899. Response 
  1900.  of "
  1901.  to "
  1902. OriginalSubject
  1903.     0R1S2S3S4S8S9S10S11S12S13S14S15S16S17S
  1904. NewRespTitle
  1905. StandardTitle
  1906.     0R4S6S
  1907. "MS Sans Serif
  1908. Times New Roman
  1909.  Response
  1910. @___@
  1911. <a>7`^
  1912. `!bb!R
  1913. SubjectKey thought of this response
  1914.     Created by
  1915. FromThe name of the person who composed the response
  1916. DateThe date/time when the document was composed
  1917. TimeCreated
  1918. ExpireDate
  1919.     1S2S
  1920. The document and its responses will be archived 
  1921. on a schedule determined by the Archive Profile
  1922.     This document was marked expired on
  1923. ExpireDate
  1924. ExpireDateDisplay
  1925. @___@
  1926. <a>7`^
  1927. `!bb!R
  1928. BodyEnter the text of your response
  1929.     -------------------------------------------------------------------------------------------------------------------------------------------------
  1930.     Hidden Fields:    
  1931. OriginalSubject
  1932. OriginalSubject
  1933. Subject
  1934.     7S9S
  1935. OriginalSubjectHidden field to store topic of Main Document
  1936. Closes 
  1937.     0S0E
  1938. _Edit Document
  1939. Categori_zeb
  1940. Send Docu_ment
  1941. _Forward
  1942. _Move to Folder...
  1943. _Remove from Folder?
  1944. O=Lotus Notes
  1945. O=Lotus Notes
  1946. PURSAFO
  1947. |.:#U
  1948. O=Lotus Notes
  1949. CN=Lotus Notes Template Development/O=Lotus Notes
  1950. PURSAFO
  1951. Fde!f^^
  1952. $TITLE
  1953. $Info
  1954. $WindowTitle
  1955. $$Script_O
  1956. $$ScriptName
  1957. TimeCreated
  1958. $Body
  1959. $ACTIONS
  1960. New Document
  1961. Subject
  1962.     4S6S
  1963. "MS Sans Serif
  1964. Times New Roman
  1965. Helvetica
  1966. '++LotusScript Development Environment:2:5:(Options):0:66
  1967. Option Public
  1968. '++LotusScript Development Environment:2:5:(Forward):0:1
  1969. '++LotusScript Development Environment:2:5:(Declarations):0:10
  1970. Dim FormW As NotesUIWorkspace
  1971. Dim FormDoc As NotesUIDocument
  1972.  Document'++LotusScript Development Environment:2:5:(Options):0:66
  1973. '++LotusScript Development Environment:2:5:(Forward):0:1
  1974. Declare Sub Exiting(Source As Field)
  1975. '++LotusScript Development Environment:2:5:(Declarations):0:2
  1976. '++LotusScript Development Environment:2:2:BindEvents:1:129
  1977. Private Sub BindEvents(Byval Objectname_ As String)
  1978.      Static Source As FIELD
  1979.      Set Source = Bind(Objectname_)
  1980.      On Event Exiting From Source Call Exiting
  1981. End Sub
  1982. '++LotusScript Development Environment:2:2:Exiting:1:12
  1983. Sub Exiting(Source As Field)
  1984.      Set FormW = New NotesUIWorkspace
  1985.      Set FormDoc = FormW.CurrentDocument
  1986.      FormDoc.refresh
  1987.      
  1988. End Sub
  1989. DocumentWorkflow
  1990.     DocumentWorkflow Subform
  1991.     :  This Subform includes the LotusScript, Actions, and hidden fields which are used in all versions of the Document form.
  1992.     Hidden Fields:-------------------------------------------------------------------
  1993. DocumentAuthors
  1994.     4S6S
  1995. DocumentAuthors
  1996. Scope
  1997. Private
  1998. Reviewers
  1999.     3S4S6S7S8S10SDocumentReaders
  2000. LastEditor
  2001. Scope
  2002. Private
  2003.     1S2S
  2004. Scope
  2005. Public
  2006. Scope
  2007.     1S2S3S4S
  2008. %12-/H
  2009. !G,$W,#I4)X6(H,4W,4G98X<6h*#x+$g9)w8(h.6u-2g<5w<4>B=YA
  2010. WC9iB.xC-iF8wH8jT>zR<rd?
  2011. 2L3;FK=D
  2012. j=C:FQ8Qp<b
  2013. GEHXHGLQLZSKEKUVKSGRYYWWgJEvIEiTHyWFfLRwKSgYWwZV[cXtfYPZjl\dWfphhhvigkqlysjhktvlsjtxyww
  2014. Subject
  2015.     0S0E
  2016. SubjectRequired: description of this document 
  2017.     Created By:    
  2018. FromDocument author name
  2019.      on 
  2020. DateThe date/time when the document was composed
  2021.      at 
  2022. TimeCreated
  2023.     Category
  2024. Miscellaneous
  2025. CategoriesPress ENTER for list of keywords or to add a new keyword
  2026. ($All)
  2027.     4S6S
  2028. ExpireDate
  2029.     1S2S
  2030. The document and its responses will be archived 
  2031. on a schedule determined by the Archive Profile
  2032.     This document was marked expired on
  2033. ExpireDate
  2034. ExpireDateDisplay
  2035. Status
  2036. StatusListv
  2037.     4S6S7S8S9S10S11S
  2038. Review Cycle Information
  2039. Status
  2040. StatusListv
  2041.     4S6S7S8S9S
  2042. Paintbrush cann
  2043. this file becaus
  2044.  created using a
  2045.  of Windows earl
  2046.  3.0.
  2047. Save As
  2048.  From
  2049. Copy To
  2050. Save Colors As
  2051. Printing '%s' on
  2052. on %s
  2053. Page %d of
  2054. % donelNot enoug
  2055.  to print.
  2056. more application
  2057. rease available 
  2058.     Originator
  2059.     Previous reviewers
  2060.     Current Reviewers
  2061.     Future reviewers
  2062. tmpOriginator
  2063. PreviousReviewers
  2064. PreviousReviewers
  2065. CurrentReviewers
  2066. CurrentReviewers
  2067. FutureReviewers
  2068. FutureReviewers
  2069. Status
  2070. StatusListv
  2071.     4S6S7S8S9S
  2072. Paintbrush cann
  2073. this file becaus
  2074.  created using a
  2075.  of Windows earl
  2076.  3.0.
  2077. Save As
  2078.  From
  2079. Copy To
  2080. Save Colors As
  2081. Printing '%s' on
  2082. on %s
  2083. Page %d of
  2084. % donelNot enoug
  2085.  to print.
  2086. more application
  2087. rease available 
  2088.     Originator
  2089.     Reviewers
  2090.     Review Options
  2091. tmpOriginator_1
  2092. Reviewers
  2093. Reviewers
  2094. ReviewersEnter the reviewers' names (do not use Group names)
  2095. ReviewStyle
  2096. ReviewStyle
  2097. Serial review | Serial.NoVersionsSerial (keep all revisions) | Serial.VersionsDocument reservations | Parallel.NoVersionsResponse review | Parallel.Versions
  2098. ReviewWindow
  2099. ReviewWindow
  2100. No time limit for each review | NoLimitMove to next reviewer after: | MoveOnKeep sending reminders after: | Reminder
  2101. ReviewTime
  2102. ReviewTime
  2103. ReviewWindow
  2104. NoLimit
  2105. day(s)
  2106.     3S4S6S8S
  2107. tmpReviewUnits
  2108. NotifyAfter
  2109. NotifyAfter
  2110. Notify originator after each reviewer | EachNotify originator after final reviewer | Final
  2111. BodyEnter the text (or a description) of the document.
  2112.     ...........................
  2113. ReviewerLog
  2114.     1S2S3S4S
  2115. Reviewer Log
  2116. ReviewerLog
  2117.     1S2S
  2118. ReviewerLog
  2119. ReviewerLog
  2120. Close
  2121.     0S0E
  2122. _Edit Document
  2123. DocumentAuthors
  2124.     9S15S
  2125. Categori_ze_
  2126. _Forward
  2127. _Move to Folder...
  2128. _Remove from Folder
  2129. Send Docu_ment
  2130. O=Lotus Notes
  2131. O=Lotus Notes
  2132. PURSAFO
  2133. |.:#U
  2134. O=Lotus Notes
  2135. CN=Lotus Notes Template Development/O=Lotus Notes
  2136. PURSAFO
  2137. Fde!f^^
  2138. $TITLE
  2139. $Info
  2140. $SubForms
  2141. $WindowTitle
  2142. $Script
  2143. $$Script_O
  2144. $$ScriptName
  2145. $$Reviewers
  2146. $Reviewers_O
  2147. TimeCreated
  2148. $Body
  2149. $ACTIONS
  2150. Times New Roman
  2151. Task List
  2152. &Switch To
  2153. About Document Library
  2154.  @  @@ @` @
  2155. @@ @@@@@`@@
  2156. `@ `@@`@``@
  2157.     What does this database do?
  2158.     A Document Library application is an electronic filing cabinet that stores reference documents for access by a workgroup.  The database might contain anything from environmental impact statements for a group of engineers to financial statements for a group of loan officers.
  2159.     Who will use this database?
  2160.     Anyone who wishes to create a record of a document or review available documents may use this database.
  2161.     Important Features
  2162.     Review Cycle:
  2163.      Used to 
  2164.     route a document to a series of recipients.
  2165.     Document Archiving:
  2166.     Used to move expired documents to an archive database.
  2167.     Suggestions for Modifications
  2168.     Full text search: 
  2169.     If you wish to use Notes' full text search capabilities for a database created with this template, select menu File, Database, Properties, go to the Full Text panel and then select Create Index... to create the full text index.
  2170.     Where to find more information?
  2171.     -  More information can be found by selecting Help, Using Database
  2172.     Access Control
  2173.     Very Important:  
  2174.     Access level should be 
  2175.     Author
  2176.      for all users of this database.  This will prevent unauthorized editing of documents within the database.  The Author fields within the forms govern who will be able to edit/review particular documents.   Errors will occur if someone with Editor access attempts to review a document when they are not an authorized reviewer of that document.
  2177. O=Lotus Notes
  2178. O=Lotus Notes
  2179. PURSAFO
  2180. |.:#U
  2181. O=Lotus Notes
  2182. CN=Lotus Notes Template Development/O=Lotus Notes
  2183. PURSAFO
  2184. Fde!f^^
  2185. $Info
  2186. $Body
  2187. Locked
  2188.     1S2S3S
  2189. DocumentAuthors
  2190. CurrentReviewers
  2191.     0R1S2S3S8S9S11S13S
  2192.     0S0E
  2193. O=Lotus Notes
  2194. O=Lotus Notes
  2195. PURSAFO
  2196. |.:#U
  2197. O=Lotus Notes
  2198. CN=Lotus Notes Template Development/O=Lotus Notes
  2199. PURSAFO
  2200. Fde!f^^
  2201. $TITLE
  2202. $Comment
  2203. $Formula
  2204. $TYPE
  2205. $Operation
  2206. $Scan
  2207. Archive Log
  2208. Times New Roman
  2209.  ArchiveLog
  2210. $MessageType
  2211. %12-/H
  2212. !G,$W,#I4)X6(H,4W,4G98X<6h*#x+$g9)w8(h.6u-2g<5w<4>B=YA
  2213. WC9iB.xC-iF8wH8jT>zR<rd?
  2214. 2L3;FK=Dj=C:FQ8Qp<b
  2215. GEHXHGLQLZSKEKUVKSGRYYWWgJEvIEiTHyWFfLRwKSgYWwZV[cXtfYPZjl\dWfphhhvigkqlysjhktvlsjtxyww
  2216. Archive Log 
  2217. LogCount
  2218. LogTotal
  2219.  for 
  2220. ArchiveDate
  2221. ArchiveTrailer
  2222. ArchiveTrailer
  2223.     Hidden:  
  2224. Archive Log for 
  2225. ArchiveDate
  2226.     1S2S
  2227. Subject
  2228. (Archive)
  2229. Categories
  2230. Close
  2231.     0S0E
  2232. Categori_ze
  2233. _Edit Document
  2234. Send Docu_ment
  2235. _Forward
  2236. _Move to Folder...
  2237. _Remove from Folder
  2238. O=Lotus Notes
  2239. O=Lotus Notes
  2240. PURSAFO
  2241. |.:#U
  2242. O=Lotus Notes
  2243. CN=Lotus Notes Template Development/O=Lotus Notes
  2244. PURSAFO
  2245. Fde!f^^
  2246. DocLife
  2247. $ManualArchivers_O
  2248. ObsoleteLife
  2249. DocumentLife
  2250. $TITLE
  2251. $Info
  2252. $WindowTitle
  2253. $$Script_O
  2254. $$ScriptName
  2255. ArchiveDate
  2256. $Body
  2257. $ACTIONS
  2258. GOLAx
  2259. Started running agent 'Mark/Unmark Document As Expired' on 07/20/96 02:03:32 PM
  2260. Running on selected documents: 1 total
  2261. Found 1 document(s) that match search criteria
  2262. 1 document(s) were modified by formula
  2263. Done running agent 'Mark/Unmark Document As Expired' on 07/20/96 02:03:39 PM
  2264. '++LotusScript Development Environment:2:5:(Options):0:66
  2265. Option Public
  2266. '++LotusScript Development Environment:2:5:(Forward):0:1
  2267. Declare Sub Initialize
  2268. Declare Sub ProcessDocument
  2269. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2270. Dim session As NotesSession
  2271. Dim db As NotesDatabase
  2272. Dim documents As NotesDocumentCollection
  2273. Dim note As NotesDocument
  2274. '++LotusScript Development Environment:2:2:Initialize:1:10
  2275. Sub Initialize
  2276.      Set session = New NotesSession
  2277.      Set db = session.CurrentDatabase
  2278.      Set documents = db.UnprocessedDocuments
  2279.      
  2280.      Set note = documents.GetFirstDocument
  2281.      While Not (note Is Nothing)
  2282.           ProcessDocument
  2283.           Set note = documents.GetNextDocument(note)
  2284.      Wend
  2285. End Sub
  2286. '++LotusScript Development Environment:2:2:ProcessDocument:1:8
  2287. Sub ProcessDocument
  2288.      Dim ExpireError As String
  2289.      Dim dtNow As New NotesDateTime("")
  2290.      
  2291.      ExpireError = "This " & note.Form(0) & " cannot be marked as expired."
  2292.      
  2293. 'is this document is protected from archiving, ignore it
  2294.      If note.HasItem("ProtectFromArchive") Then Exit Sub
  2295.      
  2296. 'if this note does not have an ExpireDate value, set it to today
  2297.      If note.ExpireDate(0) = "" Then
  2298.           dtNow.SetNow
  2299.           note.ExpireDate = dtNow.LSLocalTime
  2300.           note.Save True,True
  2301.      Else
  2302.           Select Case Msgbox ("This document was marked expired on " & Cstr(note.ExpireDate(0)) & ".  Would you like to unmark it?",36,"Expire Date")
  2303.           Case 6
  2304.                note.RemoveItem "ExpireDate"
  2305.                note.Save True,True
  2306.           End Select
  2307.      End If
  2308. End Sub
  2309. O=Lotus Notes
  2310. O=Lotus Notes
  2311. PURSAFO
  2312. |.:#U
  2313. O=Lotus Notes
  2314. CN=Lotus Notes Template Development/O=Lotus Notes
  2315. PURSAFO
  2316. Fde!f^^
  2317. $TITLE
  2318. $AssistType
  2319. $AssistLastRun
  2320. $AssistDocCount
  2321. $AssistFlags
  2322. $AssistTrigger
  2323. $AssistInfo
  2324. $AssistQuery
  2325. $AssistAction
  2326. $AssistAction_Ex
  2327. (ArchiveInstructions)(ArchiveInstructions)C
  2328. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################################################
  2329. ($Profiles)|($Profiles)
  2330. PersonName"
  2331.     1S2S
  2332. $70PersonName$Conflict
  2333. Profile
  2334.     L1S5S1!
  2335. $70PersonName
  2336. $70Type2
  2337. PersonName"
  2338.     1S2S
  2339. PersonNamePerson Name&
  2340. Lotus NotesCN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#################################################
  2341. 255D2116B7BDFECF1769F57E5917AA29Lotus Notes
  2342. Archive ProfileArchiveProfileArchive ProfileCD
  2343. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#########################################
  2344. (ProcessExistingDbDlg)DC
  2345. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes############################
  2346. _Archiving|Archiving
  2347. Archive Logs
  2348. Archive Profile
  2349.     6S9S11S
  2350. $75$74Subject$Conflict
  2351. Archive
  2352.     L1S5S1(
  2353. $75$74Subject
  2354. Archive Logs
  2355. Archive Profile
  2356.     6S9S11S$74
  2357. SubjectDescription&
  2358. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes################################
  2359. K!Dp    }
  2360. (ArchiveProfileDlg)CD
  2361. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes#######
  2362. Periodic Archive
  2363. 1SfL3
  2364. CN=Ryan Jansen/O=IrisCN=Lotus Notes Template Development/O=Lotus Notesj
  2365. #######################################################
  2366. ##########################################################
  2367. ##########################################################
  2368. ##########################################################
  2369. ##########################################################
  2370. ##########################################################
  2371. ##########################################################
  2372. ##########################################################
  2373. ##########################################################
  2374. Times New Roman
  2375.  (ArchiveInstructions)
  2376. Archive Profile Help
  2377. The Archive Profile allows you to specify which documents should
  2378. be removed from the current database and stored in an archive
  2379. database.  This allows you to keep your discussion up-to-date 
  2380. with only the latest topics.  
  2381. You can choose the following in your ArchiveProfile:
  2382.     Archive expired documents
  2383.         Choose this option if you wish to archive documents which have been 
  2384.         marked as expired. Indicate the number of days to wait before the expired
  2385.         documents are archived.
  2386.     Archive documents which have no activity
  2387.         Choose this option if you wish to archive documents which have had 
  2388.         no activity. Indicate the number of days to wait before the inactive documents 
  2389.         are archived.    
  2390.     Generate an Archive Log each time an archive occurs
  2391.         Choose this option if you wish to have an Archive Log created when documents 
  2392.         are archived.  You can also indicate if you would like document links to the 
  2393.         archived documents included in the Archive Log.
  2394.     Archive Profile Editors:
  2395.         Specify the names of those users that should be allowed to modify the Archive Profile.
  2396.     Specify Archive Location:
  2397.         Click on this button to specify the server and filename of the Archive database. The archive
  2398.         database is created for you based upon the values specified in the dialog box.
  2399. O=Lotus Notes
  2400. O=Lotus Notes
  2401. PURSAFO
  2402. |.:#U
  2403. O=Lotus Notes
  2404. CN=Lotus Notes Template Development/O=Lotus Notes
  2405. PURSAFO
  2406. Fde!f^^
  2407. $TITLE
  2408. $Info
  2409. $$ScriptName
  2410. $Body
  2411. Delete 
  2412.     0S0E
  2413. _Forward
  2414. Categori_ze
  2415. Edit Message
  2416. Out Of the Office
  2417. Out Of Office Profile
  2418. _Move to Folder...
  2419. _Remove from Folder...
  2420. O=Lotus Notes
  2421. O=Lotus Notes
  2422. PURSAFO
  2423. |.:#U
  2424. O=Lotus Notes
  2425. CN=Lotus Notes Template Development/O=Lotus Notes
  2426. PURSAFO
  2427. Fde!f^^
  2428. $Index
  2429. $Formula
  2430. $FormulaClass
  2431. $VIEWFORMAT
  2432. $Comment
  2433. $ACTIONS
  2434. Archive Profile
  2435. Times New Roman
  2436. '++LotusScript Development Environment:2:5:(Options):0:66
  2437. Option Public
  2438. '++LotusScript Development Environment:2:5:(Forward):0:1
  2439. Declare Sub Initialize
  2440. Declare Sub ProcessExistingArchiveDB
  2441. Declare Sub ProcessNonExistingArchiveDB 
  2442. Declare Sub ProcessArchiveDbExists
  2443. Declare Sub CreateNewArchiveDB
  2444. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2445. %INCLUDE "lsconst.lss"
  2446. Dim s As NotesSession
  2447. Dim w As NotesUIWorkspace
  2448. Dim db As NotesDatabase
  2449. Dim existingdb As NotesDatabase
  2450. Dim archivedb As NotesDatabase
  2451. Dim view As NotesView
  2452. Dim note As NotesDocument
  2453. Dim profile As NotesDocument
  2454. Dim archivedoc As NotesDocument
  2455. Dim doc As NotesUIDocument
  2456. Dim DocWasSaved As Integer
  2457. Dim DoNotClose As Variant
  2458. Dim ExistingServer As String
  2459. Dim ExistingPath As String
  2460. '++LotusScript Development Environment:2:2:Initialize:1:10
  2461. Sub Initialize
  2462.      
  2463. End Sub
  2464. '++LotusScript Development Environment:2:2:ProcessExistingArchiveDB:1:12
  2465. Sub ProcessExistingArchiveDB
  2466. an existing archive already exists and the user has choosen to create a new one
  2467. this function gets called on one of two occasions
  2468. either the document has a value in the tmpArchivePath field
  2469. or the user entered a server and path that has an existing database
  2470. we need to handle both cases
  2471. %END REM
  2472.      
  2473. End Sub
  2474. '++LotusScript Development Environment:2:2:ProcessNonExistingArchiveDB:1:8
  2475. Sub ProcessNonExistingArchiveDB 
  2476.      On Error Goto ProcessError         
  2477.      On Error 4005 Goto DbCreateError
  2478.      'render the dialog box to get the location of the archive database
  2479.      If (w.DialogBox("(ArchiveProfileDlg)",True,True,"Specify New Location")) Then
  2480.           'see if the archive database exists
  2481.           Set archivedb = New NotesDatabase(note.ArchiveServer(0),note.ArchivePath(0))
  2482.           If (archivedb.IsOpen) Then
  2483.                Msgbox "Database already exists. Enter a new location"
  2484.                ProcessNonExistingArchiveDB          
  2485.           Else
  2486.                Set archivedb = db.CreateCopy(note.ArchiveServer(0),note.ArchivePath(0))
  2487.                archivedb.Title = db.Title & " (Archive)"
  2488.           End If
  2489.           Call doc.Reload
  2490.           Call doc.Refresh
  2491.      Else
  2492.           note.ArchiveServer = ""
  2493.           note.ArchivePath = ""
  2494.      End If
  2495.      Exit Sub
  2496. DbCreateError:
  2497.      Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
  2498.      Case 6
  2499.           ProcessNonExistingArchiveDb
  2500.      End Select
  2501.      Exit Sub        
  2502. ProcessError:
  2503.      Msgbox Error & " - (ProcessNonExistingArchiveDB)"
  2504.      Exit Sub
  2505. End Sub
  2506. '++LotusScript Development Environment:2:2:ProcessArchiveDbExists:1:8
  2507. Sub ProcessArchiveDbExists
  2508.      'this function gets called if a database already exists in the tmpArchiveServer field
  2509.      'render the dialog box to get the location of the archive database
  2510.      On Error 4005 Goto DbCreateError
  2511.      If (w.DialogBox("(ProcessExistingDbDlg)",True,True,"Specify New Location")) Then
  2512.           On Error Resume Next          
  2513.           'see if the archive database exists
  2514.           Set archivedb = New NotesDatabase(note.ArchiveServer(0),note.ArchivePath(0))
  2515.           If (archivedb.IsOpen) Then
  2516.                Msgbox "Database already exists. Enter a new location"
  2517.                ProcessArchiveDbExists          
  2518.           Else
  2519.                Call CreateNewArchiveDB
  2520.                archivedb.Title = db.Title & " (Archive)"
  2521.           End If
  2522.           Call doc.reload
  2523.           Call doc.refresh
  2524.      End If        
  2525.      Exit Sub
  2526. DbCreateError:
  2527.      Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
  2528.      Case 6
  2529.           ProcessNonExistingArchiveDb
  2530.      End Select
  2531.      Exit Sub        
  2532. End Sub
  2533. '++LotusScript Development Environment:2:2:CreateNewArchiveDB:1:8
  2534. Sub CreateNewArchiveDB
  2535.      On Error 4005 Goto DbCreateError
  2536.      On Error Goto ProcessError
  2537.      
  2538. 'first, create the archive database     
  2539.      Set archivedb = db.CreateCopy(note.ArchiveServer(0),note.ArchivePath(0))
  2540.      
  2541. 'if the profile says to copy new documents, then copy them now
  2542.      If (note.CopyOptions(0) = "1") Then
  2543.           Set allDocs = existingdb.AllDocuments
  2544.           For i = 1 To allDocs.Count          
  2545.                Set archivedoc = allDocs.GetNthDocument(i)     
  2546.                Call archivedoc.CopyToDatabase(archivedb)
  2547.           Next
  2548.      End If
  2549.      
  2550. 'if the profile says we should delete the original archive database, then remove it
  2551.      If (note.DeleteOptions(0) = "1") Then Call existingdb.Remove
  2552.      
  2553.      Exit Sub
  2554. DbCreateError:
  2555.      Select Case Msgbox("Error creating archive database. The server may be down or you don't have access to create new databases on the server. Click Yes to try a different location now or No to cancel.",36,"Error")
  2556.      Case 6
  2557.           ProcessNonExistingArchiveDb
  2558.      End Select
  2559.      Exit Sub        
  2560. ProcessError:
  2561.      Msgbox Error & " - (ProcessNonExistingArchiveDB)"
  2562.      Exit Sub
  2563. End Sub
  2564.  Archive Profile'++LotusScript Development Environment:2:5:(Options):0:66
  2565. '++LotusScript Development Environment:2:5:(Forward):0:1
  2566. Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2567. Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)
  2568. Declare Sub Postopen(Source As Notesuidocument)
  2569. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2570. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2571. Private Sub BindEvents(Byval Objectname_ As String)
  2572.      Static Source As NOTESUIDOCUMENT
  2573.      Set Source = Bind(Objectname_)
  2574.      On Event Queryclose From Source Call Queryclose
  2575.      On Event Querysave From Source Call Querysave
  2576.      On Event Postopen From Source Call Postopen
  2577. End Sub
  2578. '++LotusScript Development Environment:2:2:Queryclose:1:12
  2579. Sub Queryclose(Source As Notesuidocument, Continue As Variant)
  2580.      
  2581.      If (DocWasSaved = False) Or (profile Is Nothing) Or DoNotClose Then Exit Sub
  2582.      
  2583.      ItemList = profile.Items
  2584.      Forall n In ItemList
  2585.           profile.RemoveItem(n.Name)    
  2586.      End Forall
  2587.      note.CopyAllItems profile
  2588.      profile.SaveOptions = "1"
  2589.      profile.save True, True
  2590.      
  2591. End Sub
  2592. '++LotusScript Development Environment:2:2:Querysave:1:12
  2593. Sub Querysave(Source As Notesuidocument, Continue As Variant)
  2594.      
  2595.      DocWasSaved = True
  2596.      DoNotClose = False     
  2597.      If Not(profile Is Nothing) Then note.SaveOptions = "0"
  2598.      If (note.ArchivePath(0) = "") Then Msgbox "You will need to specify a location of the archive database before you can archive documents.",16     
  2599.      source.Reload
  2600.      source.RefreshHideFormulas  
  2601. End Sub
  2602. '++LotusScript Development Environment:2:2:Postopen:1:12
  2603. Sub Postopen(Source As Notesuidocument)
  2604.      'initialize global variables
  2605.      Set note = source.Document
  2606.      Set w = New NotesUIWorkspace
  2607.      Set s = New NotesSession
  2608.      Set db = s.CurrentDatabase
  2609.      Set view = db.GetView("Archiving")
  2610.      Set doc = source
  2611.      'turn off auto reload to make processing faster
  2612.      source.AutoReload = False
  2613.      'if this is not a new doc, we don't need to continue
  2614.      If Not (source.IsNewDoc) Then Exit Sub
  2615.      'get the existing profile
  2616.      key = "Archive Profile"
  2617.      Set profile = view.GetDocumentByKey(key,False)
  2618.      If profile Is Nothing Then
  2619.           'an existing profile was not found
  2620.           note.ProtectFromArchive = 1
  2621.           note.ExcludeFromView = "D"
  2622.           note.From = "Archiving"
  2623.           note.Subject = "Archive Profile"
  2624.           note.Categories = "(Archive)"
  2625.           Call note.ReplaceItemValue("_ViewIcon", 11)
  2626.           source.reload
  2627.      Else
  2628.           'copy the profile fields to this document
  2629.           ItemList = note.Items
  2630.           Forall n In ItemList
  2631.                note.RemoveItem(n.Name)    
  2632.           End Forall
  2633.           profile.CopyAllItems note
  2634.           source.Reload
  2635.           If source.EditMode Then source.Refresh
  2636.      End If
  2637.      
  2638.      DocWasSaved = False
  2639.      
  2640. End Sub
  2641. K     ,`
  2642. Archive Profile 
  2643. ArchiveExpired
  2644. Archive Expired documents | Yes
  2645.     after
  2646. ExpiredLife
  2647. Number cannot be negative.{
  2648.     3S4S6S11SExpiredLife
  2649.     days
  2650. ArchiveInactive
  2651. Archive documents which have no activity | Yes
  2652.     after
  2653. DocumentLife
  2654. Number cannot be negative.{
  2655.     3S4S6S11SDocumentLife
  2656.     days
  2657. ArchiveLog
  2658. Generate an Archive Log each time an archive occurs | Yes
  2659. IncludeDoclinks
  2660. Include document links | Yes
  2661.     Archive Profile editors:
  2662. ProfileEditors
  2663.     Archive Server:
  2664. ArchivePath
  2665. ArchiveServer
  2666. Local
  2667. ArchiveServer
  2668.     3S4S9S10S12S14StmpArchiveServer
  2669.     Archive Path:
  2670. ArchivePath
  2671. tmpArchivePath
  2672. Categori_zeK
  2673. _Edit Document
  2674. Send Docu_ment
  2675. _Forward
  2676. Close
  2677.     0S0E
  2678. Save Profile 
  2679.     0S0E
  2680. Specify Archive Location'++LotusScript Development Environment:2:5:(Options):0:66
  2681. '++LotusScript Development Environment:2:5:(Forward):0:1
  2682. Declare Sub Click(Source As Button)
  2683. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2684. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2685. Private Sub BindEvents(Byval Objectname_ As String)
  2686.      Static Source As BUTTON
  2687.      Set Source = Bind(Objectname_)
  2688.      On Event Click From Source Call Click
  2689. End Sub
  2690. '++LotusScript Development Environment:2:2:Click:1:12
  2691. Sub Click(Source As Button)
  2692.      
  2693. 'see if an archive database already exists based upon some field values
  2694.      If (Len(note.tmpArchivePath(0)) >0) Then
  2695.           If (note.tmpArchiveServer(0) = "Local") Then
  2696.                Fullpath$ = note.tmpArchivePath(0)
  2697.                ExistingServer = ""
  2698.           Else
  2699.                Fullpath$ = note.tmpArchiveServer(0) + "!!" + note.tmpArchivePath(0)
  2700.                ExistingServer = note.tmpArchiveServer(0)
  2701.           End If
  2702.           ExistingPath = note.tmpArchivePath(0)
  2703.           Set existingdb = New NotesDatabase(ExistingServer,ExistingPath)
  2704.           If (existingdb.IsOpen) Then
  2705.                Select Case Msgbox("The database (" + Fullpath$ + ") already exists. To create a new database, select OK, otherwise click Cancel",33,"Database already exists")
  2706.                Case IDOK: ProcessArchiveDBExists
  2707.                End Select
  2708.           Else
  2709.                ProcessNonExistingArchiveDB
  2710.           End If
  2711.      Else
  2712.           ProcessNonExistingArchiveDB
  2713.      End If
  2714. End Sub
  2715. InstructionsF
  2716. (ArchiveInstructions)
  2717.     2S4S
  2718. _Move to Folder...    
  2719. _Remove from FolderK
  2720. O=Lotus Notes
  2721. O=Lotus Notes
  2722. PURSAFO
  2723. |.:#U
  2724. O=Lotus Notes
  2725. CN=Lotus Notes Template Development/O=Lotus Notes
  2726. PURSAFO
  2727. Fde!f^^
  2728. 2&g=/
  2729. DocLife
  2730. ArchiveDate
  2731. ObsoleteLife
  2732. $ManualArchivers_O
  2733. $TITLE
  2734. $Info
  2735. $WindowTitle
  2736. $Script
  2737. $$Script_O
  2738. $$ScriptName
  2739. $$FormScript
  2740. $$$FormScript_O
  2741. ExpiredLife
  2742. DocumentLife
  2743. $Body
  2744. $ACTIONS
  2745. $SCRIPTOBJ_6
  2746. (ProcessExistingDbDlg)'++LotusScript Development Environment:2:5:(Options):0:66
  2747. '++LotusScript Development Environment:2:5:(Forward):0:1
  2748. Declare Sub Postopen(Source As Notesuidocument)
  2749. '++LotusScript Development Environment:2:5:(Declarations):0:2
  2750. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2751. Private Sub BindEvents(Byval Objectname_ As String)
  2752.      Static Source As NOTESUIDOCUMENT
  2753.      Set Source = Bind(Objectname_)
  2754.      On Event Postopen From Source Call Postopen
  2755. End Sub
  2756. '++LotusScript Development Environment:2:2:Postopen:1:12
  2757. Sub Postopen(Source As Notesuidocument)
  2758.      source.RefreshHideFormulas
  2759. End Sub
  2760. DeleteOptions
  2761. Delete the original database|1
  2762.     Documents are archived:
  2763. ArchiveLocation
  2764. Local
  2765.     1S2S
  2766.     Archive database is on server:
  2767.     Archive file:
  2768. Local
  2769. ArchiveLocation
  2770. Locally | LocalOn Server | Server
  2771.     0S0E
  2772. ArchiveServer
  2773. ArchiveLocation
  2774. Local
  2775. ArchiveServer
  2776. ArchiveServer
  2777.     4RS4E6R7S8S10RS4E12R13S14S16RS4E20S23R
  2778. ArchiveServer
  2779. CurrentPath
  2780.     1S2S6S
  2781. CurrentFile
  2782. CurrentPath
  2783.     0R1S2S6S
  2784. FileOnly
  2785. CurrentPath
  2786. CurrentFile
  2787. Macintosh
  2788. CurrentPath
  2789. CurrentFile
  2790. CurrentPath
  2791. CurrentFile
  2792. CurrentFile
  2793.     0R1S2S8S11S15S18S19S20S21S22S26S29S33S36S37S38S39S40S44S47S51S54S
  2794. DirOnly
  2795. CurrentPath
  2796. CurrentFile
  2797. Macintosh
  2798. CurrentPath
  2799. CurrentFile
  2800. CurrentPath
  2801. CurrentFile
  2802.     0R1S2S8S11S15S17S18S20S21S22S23S24S28S31S35S37S38S40S41S42S43S44S48S51S55S57S58S60S
  2803. DirOnly
  2804. FileOnly"
  2805. CurrentPath
  2806.     0RR1S2S5S6S8S10S11S15S
  2807. ArchivePath
  2808. Please specify the filename of the archive database
  2809.     3S4S6S11SArchivePath
  2810.     After creating the new archive db:
  2811. servers
  2812. names.nsf
  2813. ($ServersLookup)
  2814.     1S2S
  2815. selectedserver
  2816. Server
  2817. Please select a server to create your archive database on.
  2818. ArchiveServer
  2819. servers
  2820.     0R1S2S
  2821. ArchiveServer
  2822. selectedServer
  2823.     0R1S2S3S
  2824. ?_?__
  2825. `!b`1
  2826. 7`^///?
  2827. ?b___
  2828. `bOOO
  2829. `<b!R
  2830. @If(@IsN
  2831. CopyOptions
  2832. Copy documents from the original archive to the new one|1
  2833. O=Lotus Notes
  2834. O=Lotus Notes
  2835. PURSAFO
  2836. |.:#U
  2837. O=Lotus Notes
  2838. CN=Lotus Notes Template Development/O=Lotus Notes
  2839. PURSAFO
  2840. Fde!f^^
  2841. $TITLE
  2842. $Info
  2843. $$Script_O
  2844. $$ScriptName
  2845. $$FormScript
  2846. $$$FormScript_O
  2847. $Body
  2848. _Forward
  2849. Categori_zeK
  2850. Edit Document
  2851. _Move to Folder...
  2852. _Remove from Folder...
  2853. Setup Archive...L
  2854. ArchiveProfile
  2855. Server
  2856.     1S2S6S
  2857.     0R1S2S6S
  2858. Server
  2859.     0R7S8S11S13S14S15S16S
  2860. Archive NowK
  2861. Archive Profile
  2862.     1S2S
  2863. AllDocs
  2864. NoCache
  2865. ($Profiles)
  2866. ArchivePath
  2867.     0R1S2S8S10S12S14S
  2868. AllDocs
  2869. Error
  2870. You must specify a location for the archive database
  2871.     0R3S4S5S6S14S15S
  2872. AllDocs2
  2873. NoCache
  2874. ($Profiles)
  2875. ArchivePath
  2876. Archive Now
  2877. Before you can begin archiving documents you need to fill out an Archive Profile.  Please press "Setup Archive...".
  2878.     0RR1S2S12S14S16S18S28S30S34S
  2879. Archiving
  2880. Are you sure you want to move documents to the archive database now?
  2881.     0R6S8S11S13S
  2882. AlreadyArchived
  2883. MailArchived|
  2884. Archiving
  2885. Since this is the first time you have requested an archive, it may take several minutes.  Do you want to proceed?
  2886. Archiving
  2887. No documents were archived
  2888.     0RR1S2S8S9S11S13S19S21S24S26S32S34S
  2889. MailArchived
  2890.     0RR1S2S3S
  2891. Periodic Archive
  2892.     0R4S
  2893. Server
  2894.     1S2S6S
  2895.     0R1S2S6S
  2896. Server
  2897.     0R7S8S11S13S14S15S16S
  2898. Enable Scheduled Archivingf
  2899. AllDocs
  2900. Archiving
  2901. Archive Profile
  2902. Archive Now
  2903. Before you can begin archiving documents you need to fill out an Archive Profile.  Please press "Setup Archive...".
  2904.     1S2S10S12S14S16S20S26S28S32S
  2905. Periodic Archive
  2906.     0RR4S
  2907. Server
  2908.     1S2S6S
  2909.     0R1S2S6S
  2910. Periodic Archive
  2911. Server
  2912.     0R4S5R12S13S16S18S19S20S21S
  2913. Disable Scheduled ArchivingKf
  2914. AllDocs
  2915. Archiving
  2916. Archive Profile
  2917. Archive Now
  2918. Before you can begin archiving documents you need to fill out an Archive Profile.  Please press "Setup Archive...".
  2919.     1S2S10S12S14S16S20S26S28S32S
  2920. Periodic Archive
  2921.     0RR4S
  2922. Server
  2923.     1S2S6S
  2924.     0R1S2S6S
  2925. Periodic Archive
  2926. Server
  2927.     0R7S8R15S16S19S21S22S23S24S
  2928. Open Archive Db...'++LotusScript Development Environment:2:5:(Options):0:66
  2929. '++LotusScript Development Environment:2:5:(Forward):0:1
  2930. Declare Sub Click(Source As Button)
  2931. '++LotusScript Development Environment:2:5:(Declarations):0:10
  2932. Dim s As NotesSession
  2933. Dim w As NotesUIWorkspace
  2934. Dim sourcedb As NotesDatabase
  2935. Dim view As NotesView
  2936. Dim profile As NotesDocument
  2937. Dim server As String
  2938. '++LotusScript Development Environment:2:2:BindEvents:1:129
  2939. Private Sub BindEvents(Byval Objectname_ As String)
  2940.      Static Source As BUTTON
  2941.      Set Source = Bind(Objectname_)
  2942.      On Event Click From Source Call Click
  2943. End Sub
  2944. '++LotusScript Development Environment:2:2:Click:1:12
  2945. Sub Click(Source As Button)
  2946.      
  2947.      On Error Goto ErrorRoutine
  2948. '91 is Object Variable Not Set     
  2949.      On Error 91 Resume Next 
  2950. '4412 is the notes database does not exist     
  2951.      On Error 4412 Goto DatabaseNotExistError
  2952.      
  2953.      Set s = New NotesSession
  2954.      Set sourcedb = s.CurrentDatabase
  2955.      Set view = sourcedb.GetView("($Profiles)")
  2956.      key = "Archive Profile"
  2957.      Set profile = view.GetDocumentByKey(key)
  2958.      
  2959.      If profile Is Nothing Then
  2960.           Messagebox "There is no Archive Db for this database.", 0 + 64, "Archive"
  2961.           Exit Sub
  2962.      End If
  2963.      
  2964.      ArchivePath = profile.ArchivePath
  2965.      ArchiveServer = profile.ArchiveServer
  2966.      If (ArchivePath(0) = "") Then
  2967.           Messagebox "The archive database cannot be found. Click on the Setup Archive button to create a new archive database.",16,"Database not found"
  2968.           Exit Sub              
  2969.      End If
  2970.      
  2971.      Set w = New NotesUIWorkspace
  2972.      
  2973.      Call w.OpenDatabase(ArchiveServer(0), ArchivePath(0), "", "", "1")
  2974.      
  2975.      Exit Sub
  2976.      
  2977. ErrorRoutine:
  2978.      Messagebox "Unexpected condition: " & Err & " - " & Error
  2979.      Exit Sub
  2980. DatabaseNotExistError:
  2981.      Messagebox "The archive database cannot be found. Click on the Setup Archive button to create a new archive database.",16,"Database not found"
  2982.      Exit Sub     
  2983. End Sub
  2984. O=Lotus Notes
  2985. O=Lotus Notes
  2986. PURSAFO
  2987. |.:#U
  2988. O=Lotus Notes
  2989. CN=Lotus Notes Template Development/O=Lotus Notes
  2990. PURSAFO
  2991. Fde!f^^
  2992. $TITLE
  2993. $Index
  2994. $Formula
  2995. $FormulaClass
  2996. $VIEWFORMAT
  2997. $Comment
  2998. $ACTIONS
  2999. $SCRIPTOBJ_10
  3000. $ViewGlobalScript_O
  3001. (ArchiveProfileDlg)
  3002. Local
  3003. ArchiveLocation
  3004. Locally | LocalOn Server | Server
  3005. ArchiveLocation
  3006. Local
  3007.     1S2S
  3008.     0S0E
  3009. ArchiveServer
  3010. ArchiveLocation
  3011. Local
  3012. ArchiveServer
  3013. ArchiveServer
  3014.     4RS4E6R7S8S10RS4E12R13S14S16RS4E20S23R
  3015. ArchiveServer
  3016. CurrentPath
  3017.     1S2S6S
  3018. CurrentFile
  3019. CurrentPath
  3020.     0R1S2S6S
  3021. FileOnly
  3022. CurrentPath
  3023. CurrentFile
  3024. Macintosh
  3025. CurrentPath
  3026. CurrentFile
  3027. CurrentPath
  3028. CurrentFile
  3029. CurrentFile
  3030.     0R1S2S8S11S15S19S20S21S22S26S29S33S36S37S38S39S40S44S47S51S54S
  3031. DirOnly
  3032. CurrentPath
  3033. Macintosh
  3034. CurrentFile
  3035. CurrentFile
  3036. CurrentFile
  3037. Macintosh
  3038. CurrentPath
  3039. CurrentFile
  3040. CurrentPath
  3041. CurrentFile
  3042.     0R1S2S8S11S14S15S16S21S23S2E24S27S28S34S36S37S39S43S45S46S49S50S51S52S53S57S60S64S66S67S69S70S71S72S73S77S80S84S86S87S89S
  3043. dftvalue
  3044. DirOnly
  3045. FileOnly"
  3046. CurrentPath
  3047.     0RR1S2S3S4S7S8S10S12S13S17S
  3048. Macintosh
  3049. dftvalue
  3050. dftvalue
  3051. dftvalue
  3052. dftvalue
  3053. dftvalue
  3054.     0R3S4S5S6S21S22S23S24S25S26S
  3055. ArchivePath
  3056. Please specify the filename of the archive database
  3057.     3S4S6S11SArchivePath
  3058.     Documents are archived:
  3059.     Archive database is on server:
  3060.     Archive file:
  3061. servers
  3062. names.nsf
  3063. ($ServersLookup)
  3064.     1S2S
  3065. selectedserver
  3066. Server
  3067. Please select a server to create your archive database on.
  3068. ArchiveServer
  3069. servers
  3070.     0R1S2S
  3071. ArchiveServer
  3072. selectedServer
  3073.     0R1S2S3S
  3074. ?_?__
  3075. `!b`1
  3076. 7`^///?
  3077. ?b___
  3078. `bOOO
  3079. `<b!R
  3080. @If(@IsN
  3081. O=Lotus Notes
  3082. O=Lotus Notes
  3083. PURSAFO
  3084. |.:#U
  3085. O=Lotus Notes
  3086. CN=Lotus Notes Template Development/O=Lotus Notes
  3087. PURSAFO
  3088. Fde!f^^
  3089. $TITLE
  3090. $Info
  3091. $$ScriptName
  3092. $Body
  3093. '++LotusScript Development Environment:2:5:(Options):0:66
  3094. '++LotusScript Development Environment:2:5:(Forward):0:1
  3095. Declare Sub Initialize
  3096. Declare Sub Terminate
  3097. Declare Sub Main
  3098. Declare Sub GetProfileSettings
  3099. Declare Sub CreateLogDocument
  3100. Declare Sub ProcessDocuments
  3101. Declare Sub EvaluateDocument
  3102. Declare Sub ArchiveDocument
  3103. Declare Sub FixReaderNames
  3104. Declare Sub AddDocumentToLog
  3105. Declare Sub CloseLogDocument
  3106. Declare Sub MarkLogDocuments
  3107. '++LotusScript Development Environment:2:5:(Declarations):0:10
  3108. '%INCLUDE "lserr.lss"
  3109. '%INCLUDE "lsxbeerr.lss"
  3110. Const MAXARCHIVEITEMS = 50
  3111. Dim session As NotesSession
  3112. Dim dbSource As NotesDatabase
  3113. Dim dbArchive As NotesDatabase
  3114. Dim docSource As NotesDocument
  3115. Dim docArchive As NotesDocument
  3116. Dim docLog As NotesDocument
  3117. Dim docProfile As NotesDocument
  3118. Dim viewArchive As NotesView
  3119. Dim dtNow As NotesDateTime
  3120. Dim dtExpired As NotesDateTime
  3121. Dim dtDocument As NotesDateTime
  3122. Dim dtCompare As NotesDateTime
  3123. Dim docsCollection As NotesDocumentCollection
  3124. Dim rtitem As NotesRichTextItem
  3125. Dim item As NotesItem
  3126. Dim nidArray() As String
  3127. Dim SourcePath As String
  3128. Dim SourceServer As String
  3129. Dim ArchiveServer As String
  3130. Dim ArchivePath As String
  3131. Dim ArchiveLog As String
  3132. Dim IncludeDocLinks As String
  3133. Dim ArchiveExpired As String
  3134. Dim ArchiveInactive As String
  3135. Dim ExpiredLife As Integer
  3136. Dim DocumentLife As Integer
  3137. Dim nLogItems As Integer
  3138. Dim numDocs As Integer
  3139. Dim numDocsArchived As Integer
  3140. Dim i As Integer
  3141. Dim DoNotRun As Variant
  3142. Dim DocCanBeArchived As Variant
  3143. '++LotusScript Development Environment:2:2:Initialize:1:10
  3144. Sub Initialize
  3145.      'initialize some variables
  3146.      Set session = New NotesSession
  3147.      Set dbSource = session.CurrentDatabase
  3148.      Redim nidArray(5)
  3149.      nLogItems = 0
  3150.      numDocsArchived = 0
  3151.      'call the main entry point
  3152.      Main     
  3153. End Sub
  3154. '++LotusScript Development Environment:2:2:Terminate:1:10
  3155. Sub Terminate
  3156.      
  3157. End Sub
  3158. '++LotusScript Development Environment:2:2:Main:1:8
  3159. Sub Main
  3160. 'Read the profile document to see what options are enabled and where databases are located
  3161.      GetProfileSettings
  3162.      If DoNotRun Then Exit Sub
  3163.      
  3164. 'setup the date/time structures
  3165.      Set dtNow = New NotesDateTime("")
  3166.      Set dtExpired = New NotesDateTime("")
  3167.      Set dtDocument = New NotesDateTime("")
  3168.      Set dtCompare = New NotesDateTime("")
  3169.      dtNow.SetNow
  3170.      dtExpired.SetNow
  3171.      dtDocument.SetNow
  3172.      dtCompare.SetNow
  3173.      If ArchiveExpired = "Yes" Then dtExpired.AdjustDay(ExpiredLife * -1)
  3174.      If ArchiveInactive = "Yes" Then dtDocument.AdjustDay(DocumentLife * -1)     
  3175.      
  3176. 'open the archive database
  3177.      Set dbArchive = New NotesDatabase(ArchiveServer,ArchivePath)
  3178.      If Not (dbArchive.IsOpen) Then
  3179.           Messagebox "Unable to open archive database.",16,"Error"
  3180.           Exit Sub
  3181.      End If
  3182.      
  3183.      'see if we are logging documents, if we are, then create the first one
  3184.      If ArchiveLog = "Yes" Then CreateLogDocument
  3185.      'process the documents in the database
  3186.      'this finds all documents that needs to be archived, archives them, logs them (if necessary), and removes them from this database
  3187.      ProcessDocuments
  3188.      'mark the log documents in terms of x out of y
  3189.      If ArchiveLog = "Yes" Then MarkLogDocuments
  3190. End Sub
  3191. '++LotusScript Development Environment:2:2:GetProfileSettings:1:8
  3192. Sub GetProfileSettings
  3193.      'reads the profile document
  3194.      Set view = dbSource.GetView("Archiving")
  3195.      key = "Archive Profile"
  3196.      Set docProfile = view.GetDocumentByKey(key,False)
  3197.      If docProfile Is Nothing Then
  3198.           'there is no profile document so exit
  3199.           DoNotRun = True
  3200.      Elseif docProfile.ArchivePath(0) = "" Then
  3201.           'there is no archive database
  3202.           Msgbox "You need to specify a location for the archive database.",16,"Error"          
  3203.           DoNotRun = True
  3204.      Else
  3205.           DoNotRun = False
  3206.           ArchiveExpired = docProfile.ArchiveExpired(0)
  3207.           ArchiveInactive = docProfile.ArchiveInactive(0)
  3208.           DocumentLife = docProfile.DocumentLife(0)
  3209.           ExpiredLife = docProfile.ExpiredLife(0)
  3210.           ArchiveServer = docProfile.ArchiveServer(0)
  3211.           ArchivePath = docProfile.ArchivePath(0)
  3212.           ArchiveLog = docProfile.ArchiveLog(0)
  3213.           IncludeDocLinks = docProfile.IncludeDocLinks(0)
  3214.      End If
  3215. End Sub
  3216. '++LotusScript Development Environment:2:2:CreateLogDocument:1:8
  3217. Sub CreateLogDocument
  3218.      'creates a new log document, incrementing the counter
  3219.      Set docLog = New NotesDocument(dbSource)
  3220.      Set rtitem = New NotesRichTextItem(docLog, "Body")
  3221.      docLog.Form = "Archive Log"
  3222.      dtNow.SetNow
  3223.      docLog.ArchiveDate = dtNow.LSLocalTime
  3224.      docLog.ProtectFromArchive = 1
  3225.      docLog.ExcludeFromView = "D"
  3226.      docLog.From = "Archiving"
  3227.      docLog.Categories = "(Archive)"
  3228.      docLog.ReplaceItemValue "_ViewIcon", 22
  3229.      nLogItems = nLogItems + 1
  3230.      'see if we need to redim the array
  3231.      If nLogItems Mod 6 = 0 Then Redim Preserve nidArray(nLogItems + 4)     
  3232. End Sub
  3233. '++LotusScript Development Environment:2:2:ProcessDocuments:1:8
  3234. Sub ProcessDocuments
  3235.      'get a handle to all of the documents in the database
  3236.      Set docsCollection = dbSource.AllDocuments
  3237.      numDocs = docsCollection.Count
  3238.      For i =1 To numDocs
  3239.           Set docSource = docsCollection.GetNthDocument(i)
  3240.           'see if this document can be archived
  3241.           EvaluateDocument
  3242.           If DocCanBeArchived Then
  3243.                'archive this document
  3244.                ArchiveDocument
  3245.                If ArchiveLog = "Yes" Then AddDocumentToLog
  3246.                docSource.Remove True
  3247.           End If
  3248.           'see if we have hit the maximum number of entries in a log document; if so close the existing one and create a new one
  3249.           If (numDocsArchived Mod MAXARCHIVEITEMS = 0) And (numDocsArchived > 0) Then 
  3250.                If ArchiveLog = "Yes" Then
  3251.                     CloseLogDocument
  3252.                     CreateLogDocument                  
  3253.                End If
  3254.           End If               
  3255.      Next
  3256.      'we are done processing all of the documents, close the last log document (if necessary)
  3257.      If ArchiveLog = "Yes" Then CloseLogDocument
  3258. End Sub
  3259. '++LotusScript Development Environment:2:2:EvaluateDocument:1:8
  3260. Sub EvaluateDocument
  3261.      'checks to see if a document should be archived or not
  3262.      DocCanBeArchived = False
  3263.      'see if this document is protected from archiving
  3264.      If docSource.HasItem("ProtectFromArchive") Then
  3265.           If docSource.ProtectFromArchive(0) = 1 Then Exit Sub        
  3266.      End If
  3267.      
  3268. 'look for a $NoPurge item; if it is a date, compare it to today;
  3269.      If (docSource.HasItem("$NoPurge")) Then
  3270.           Set Purge = docSource.GetFirstItem("$NoPurge")
  3271.           If (Purge.Type = DATETIMES) Then
  3272.                Set enddt = New NotesDateTime("")
  3273.                Set enddt = Purge.DateTimeValue
  3274.                Set nowdt = New NotesDateTime("")
  3275.                nowdt.SetNow
  3276.                If enddt.TimeDifference(nowdt) >= 0 Then Exit Sub
  3277.           Else
  3278.                Exit Sub
  3279.           End If
  3280.      End If
  3281.      
  3282.      'see if we should archive documents that expire
  3283.      If ArchiveExpired = "Yes" Then
  3284.           If docSource.HasItem("ExpireDate") Then
  3285.                Set item = docSource.GetFirstItem("ExpireDate")
  3286.                Set dtCompare = item.DateTimeValue
  3287.                If dtCompare Is Nothing Then
  3288.                     Set dtCompare = New NotesDateTime("")
  3289.                     dtCompare.SetNow
  3290.                Else
  3291.                     If dtExpired.TimeDifference(dtCompare) >= 0 Then
  3292.                          DocCanBeArchived = True
  3293.                          Exit Sub ' we exit here so that we don't archive this document again
  3294.                     End If
  3295.                End If                    
  3296.           End If
  3297.      End If
  3298.      'see if we should archive documents that are inactive
  3299.      If ArchiveInactive = "Yes" Then
  3300.           dtCompare.LSLocalTime = docSource.LastAccessed
  3301.           If dtDocument.TimeDifference(dtCompare) >= 0 Then DocCanBeArchived = True
  3302.      End If
  3303. End Sub
  3304. '++LotusScript Development Environment:2:2:ArchiveDocument:1:8
  3305. Sub ArchiveDocument
  3306.      'copies the source document into the archive database
  3307. $Archived and DateArchived might already be present, if this agent failed the last
  3308. time it was run.  None of these fields should be on the archived copy, because we 
  3309. don't want the archive database to inadvertantly archive these documents (it can
  3310. archive, but it needs to use its own criteria)
  3311. %END REM
  3312.      
  3313.      If docSource.HasItem("$Archived") Then docSource.RemoveItem("$Archived")
  3314.      If docSource.HasItem("DateArchived") Then docSource.RemoveItem("DateArchived")
  3315.      If docSource.HasItem("ExpireDate") Then docSource.RemoveItem("ExpireDate")
  3316.      FixReaderNames
  3317.      docSource.Save True, True
  3318.      Set docArchive = docSource.CopyToDatabase(dbArchive)
  3319.      docSource.DateArchived = dtNow.LSLocalTime    
  3320.      Call docSource.AppendItemValue("$Archived", True)
  3321.      docSource.Save True, True
  3322.      numDocsArchived = numDocsArchived + 1
  3323. End Sub
  3324. '++LotusScript Development Environment:2:2:FixReaderNames:1:8
  3325. Sub FixReaderNames
  3326.      'if the reader access fields are blank, remove them
  3327.      If docSource.HasItem("Readers") Then
  3328.           If docSource.Readers(0) = "" Then docSource.RemoveItem("Readers")
  3329.      End If
  3330.      If docSource.HasItem("DocumentReaders") Then
  3331.           If docSource.DocumentReaders(0) = "" Then docSource.RemoveItem("DocumentReaders")
  3332.      End If
  3333.      
  3334. End Sub
  3335. '++LotusScript Development Environment:2:2:AddDocumentToLog:1:8
  3336. Sub AddDocumentToLog
  3337.      'only called if a document was archived and logging was enabled
  3338.      If IncludeDocLinks = "Yes" Then
  3339.           'the user wants a doclink to the new archived document
  3340.           Call rtitem.AppendDocLink(docArchive, "DocLink to " & docSource.Subject(0))
  3341.           Call rtitem.AddTab(1)
  3342.      End If
  3343.      Call rtitem.AppendText("     " & docSource.Subject(0) & " (created by " & docSource.From(0) &   " on " &_
  3344.      Format(docSource.Created, "Short Date") & ")")
  3345.      Call rtitem.AddNewLine(2)
  3346. End Sub
  3347. '++LotusScript Development Environment:2:2:CloseLogDocument:1:8
  3348. Sub CloseLogDocument
  3349.      'saves the log document, adds the note id to the array,
  3350.      docLog.Save True, True
  3351.      nidArray(nLogItems) = docLog.NoteID
  3352. End Sub
  3353. '++LotusScript Development Environment:2:2:MarkLogDocuments:1:8
  3354. Sub MarkLogDocuments
  3355.      'finds all of the log documents just created and marks them in terms of x out of y
  3356.      For i = 1 To nLogItems
  3357.           Set docLog = dbSource.GetDocumentByID(nidArray(i))
  3358.           If Not (docLog Is Nothing) Then
  3359.                docLog.Subject = "Log Document " &Cstr(i) & " of " & Cstr(nLogItems) & " (" & Format(docLog.Created, "General Date") & ")"
  3360.                docLog.LogCount = Cstr(i)
  3361.                docLog.LogTotal = Cstr(nLogItems)
  3362.                docLog.ArchiveTrailer = "Archive log " & Cstr(i) & "of " & Cstr(nLogItems) & " for documents on server " & _
  3363.                ArchiveServer & " from " & dbSource.Title & " (" & dbSource.FilePath & ") to " & dbArchive.Title & _
  3364.                " (" & ArchivePath & ") completed sucessfully on " & _
  3365.                Format(dtNow.LSLocalTime, "Short Date") & " at " & _
  3366.                Format(dtNow.LSLocalTime, "Long Time") & _
  3367.                ".  Expired documents are archived after " & ExpiredLife & _
  3368.                " days.  All other documents are archived after " & DocumentLife & " days of inactivity."
  3369.                docLog.Save True,True
  3370.                Call docLog.CopyToDatabase(dbArchive)
  3371.           End If
  3372.      Next
  3373. End Sub
  3374. O=Lotus Notes
  3375. O=Lotus Notes
  3376. PURSAFO
  3377. |.:#U
  3378. O=Lotus Notes
  3379. CN=Lotus Notes Template Development/O=Lotus Notes
  3380. PURSAFO
  3381. Fde!f^^
  3382. $TITLE
  3383. $AssistType
  3384. $AssistLastRun
  3385. $AssistDocCount
  3386. $AssistFlags
  3387. $AssistTrigger
  3388. $AssistInfo
  3389. $AssistQuery
  3390. $AssistAction
  3391. $AssistAction_Ex
  3392. rchiveManager
  3393. 10/11/95 08:31:58 AM Lotus Notes updated [-Default-]
  3394. 09/29/95 12:06:40 PM Catherine Duffy/Iris updated [OtherDomainServers]
  3395. 09/29/95 12:06:32 PM Catherine Duffy/Iris updated LocalDomainServers
  3396. 09/29/95 08:07:25 AM Lotus Notes updated -Default-
  3397. 09/28/95 05:01:12 PM Lotus Notes updated [OtherDomainServers]
  3398. 09/28/95 05:01:04 PM Lotus Notes updated [OtherDomainServers]
  3399. 09/28/95 10:56:54 AM Catherine Duffy/Iris deleted role ArchiveManager
  3400. 09/01/95 04:09:45 PM Lotus Notes updated [LocalDomainServers]
  3401. 09/01/95 04:09:38 PM Lotus Notes updated [OtherDomainServers]
  3402. 09/01/95 04:09:30 PM Lotus Notes updated LocalDomainServers
  3403. 09/01/95 04:09:23 PM Lotus Notes added LocalDomainServers
  3404. 09/01/95 04:09:23 PM Lotus Notes added [OtherDomainServers]
  3405. 09/01/95 04:09:23 PM Lotus Notes added [LocalDomainServers]
  3406. 09/01/95 04:09:23 PM Lotus Notes added [-Default-]
  3407. 09/01/95 04:08:35 PM Lotus Notes deleted [OtherDomainServers]
  3408. 09/01/95 04:08:32 PM Lotus Notes deleted [LocalDomainServers]
  3409. 09/01/95 04:08:30 PM Lotus Notes deleted LocalDomainServers
  3410. 09/01/95 04:08:29 PM Lotus Notes updated [LocalDomainServers]
  3411. 09/01/95 04:08:24 PM Lotus Notes updated LocalDomainServers
  3412. 09/01/95 04:08:19 PM Lotus Notes updated [OtherDomainServers]
  3413. -Default-
  3414. [-Default-]
  3415. [LocalDomainServers]
  3416. [OtherDomainServers]
  3417. LocalDomainServers
  3418.